public void start ( ) throws IOException { server = ServerSocketChannel . open ( ) ; server . configureBlocking ( false ) ; server . socket ( ) . setReuseAddress ( true ) ; server . socket ( ) . bind ( new InetSocketAddress ( port ) ) ; monitor . add ( server , this , SelectionKey . OP_ACCEPT ) ; // Print a message when we are waiting to connect manually if ( manualConnect ) { System . out . println ( "Ready to accept connections on port " + port ) ; } }
Starts the STP connection listener .