use of org.webpieces.nio.api.throughput.ClientDataListener in project webpieces by deanhiller.
the class IntegTestClientToEchoServer method testSoTimeoutOnSocket.
public void testSoTimeoutOnSocket() throws InterruptedException {
runEchoServer();
BufferPool pool2 = new TwoPools("pl", new SimpleMeterRegistry());
DataListener listener = new ClientDataListener(pool2, recorder);
Executor executor2 = Executors.newFixedThreadPool(10, new NamedThreadFactory("clientThread"));
TCPChannel channel = createClientChannel(pool2, executor2);
// TCPChannel channel = createNettyChannel();
recorder.start();
XFuture<Void> connect = channel.connect(new InetSocketAddress(4444), listener);
connect.thenAccept(p -> runWriting(channel));
synchronized (this) {
this.wait();
}
}
Aggregations