@@ -28,15 +28,15 @@ public static TransportHandler createTransportHandler(Connection con) {
2828 switch (con .getTransportHandlerType ()) {
2929 case TCP :
3030 if (localConEndType == ConnectionEndType .CLIENT ) {
31- return new ClientTcpTransportHandler (timeout , con .getHostname (), con .getPort ());
31+ return new ClientTcpTransportHandler (timeout , con .getIp (), con .getPort ());
3232 } else {
3333 return new ServerTcpTransportHandler (timeout , con .getPort ());
3434 }
3535 case EAP_TLS :
3636 throw new UnsupportedOperationException ("EAP_TLS is currently not supported" );
3737 case UDP :
3838 if (localConEndType == ConnectionEndType .CLIENT ) {
39- return new ClientUdpTransportHandler (timeout , con .getHostname (), con .getPort ());
39+ return new ClientUdpTransportHandler (timeout , con .getIp (), con .getPort ());
4040 } else {
4141 return new ServerUdpTransportHandler (timeout , con .getPort ());
4242 }
@@ -50,26 +50,26 @@ public static TransportHandler createTransportHandler(Connection con) {
5050 throw new UnsupportedOperationException ("STREAM TransportHandler can only be created manually" );
5151 case TCP_TIMING :
5252 if (localConEndType == ConnectionEndType .CLIENT ) {
53- return new TimingClientTcpTransportHandler (timeout , con .getHostname (), con .getPort ());
53+ return new TimingClientTcpTransportHandler (timeout , con .getIp (), con .getPort ());
5454 } else {
5555 return new TimingServerTcpTransportHandler (timeout , con .getPort ());
5656 }
5757 case UDP_TIMING :
5858 if (localConEndType == ConnectionEndType .CLIENT ) {
59- return new TimingClientUdpTransportHandler (timeout , con .getHostname (), con .getPort ());
59+ return new TimingClientUdpTransportHandler (timeout , con .getIp (), con .getPort ());
6060 } else {
6161 return new TimingServerUdpTransportHandler (timeout , con .getPort ());
6262 }
6363 case TCP_PROXY_TIMING :
6464 if (localConEndType == ConnectionEndType .CLIENT ) {
65- return new TimingProxyClientTcpTransportHandler (timeout , con .getHostname (), con .getPort ());
65+ return new TimingProxyClientTcpTransportHandler (timeout , con .getIp (), con .getPort ());
6666 } else {
6767 throw new UnsupportedOperationException (
6868 "TCP_PROXY_TIMING for server sockets is currently not supported" );
6969 }
7070 case TCP_NO_DELAY :
7171 if (localConEndType == ConnectionEndType .CLIENT ) {
72- return new ClientTcpNoDelayTransportHandler (timeout , con .getHostname (), con .getPort ());
72+ return new ClientTcpNoDelayTransportHandler (timeout , con .getIp (), con .getPort ());
7373 } else {
7474 throw new UnsupportedOperationException (
7575 "This transport handler type is only supported in client mode" );
0 commit comments