use of org.webpieces.nio.api.handlers.ConnectionListener in project webpieces by deanhiller.
the class Http11ClientSimulator method openHttps.
public Http11Socket openHttps() {
ConnectionListener listener = mgr.getHttpsConnection();
MockTcpChannel channel = new MockTcpChannel(parser);
CompletableFuture<DataListener> connected = listener.connected(channel, true);
try {
DataListener dataListener = connected.get(2, TimeUnit.SECONDS);
return new Http11Socket(dataListener, channel, parser);
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
Aggregations