public static Transport TCPInstance ( SocketAddress addr ) throws IOException { Socket sock = new Socket ( ) ; sock . setSoTimeout ( getTimeout ( ) ) ; sock . connect ( addr ) ; StreamTransport trans = new StreamTransport ( ) ; trans . setStreams ( sock . getInputStream ( ) , sock . getOutputStream ( ) ) ; trans . setAddressLabel ( addr . toString ( ) ) ; return trans ; }
Returns TCP transport instance connected to specified address