question: public TCPChannelClient ( ExecutorService executor , TCPChannelEvents eventListener , String ip , int port ) { this . executor = executor ; executorThreadCheck = new ThreadUtils . ThreadChecker ( ) ; executorThreadCheck . detachThread ( ) ; this . eventListener = eventListener ; InetAddress address ; try { address = InetAddress . getByName ( ip ) ; } catch ( UnknownHostException e ) { reportError ( "Invalid IP address." ) ; return ; } if ( address . isAnyLocalAddress ( ) ) { socket = new TCPSocketServer ( address , port ) ; } else { socket = new TCPSocketClient ( address , port ) ; } socket . start ( ) ; }
target:  Initializes the TCPChannelClient. If IP is a local IP address, starts a listening server on that IP. If not, instead connects to the IP.