}
doListen = true;
// allocate an unbound server socket channel
ServerSocketChannel serverChannel = ServerSocketChannel.open();
// Get the associated ServerSocket to bind it with
ServerSocket serverSocket = serverChannel.socket();
// create a new Selector for use below
selector = Selector.open();
// set the port the server channel will listen to
serverSocket.bind(new InetSocketAddress(getBind(), getTcpListenPort()));
// set non-blocking mode for the listening socket