use of org.webpieces.nio.api.channels.TCPServerChannel in project webpieces by deanhiller.
the class TestExample method startServer.
private InetSocketAddress startServer() throws Exception {
TCPServerChannel server = svc.createTCPServerChannel("server", null);
// bind to 0 allows it to bind to any port...
server.bind(new InetSocketAddress(0));
server.registerServerSocketChannel(new MyServerSocketListener());
return server.getLocalAddress();
}
use of org.webpieces.nio.api.channels.TCPServerChannel in project webpieces by deanhiller.
the class TestExampleSessions method startServer.
private InetSocketAddress startServer() throws Exception {
TCPServerChannel server = svc.createTCPServerChannel("server", null);
// bind to 0 allows it to bind to any port...
server.bind(new InetSocketAddress(0));
server.registerServerSocketChannel(new MyServerSocketListener());
return server.getLocalAddress();
}
Aggregations