public Queue<FullHttpResponse> getResponses() { return initializer.getCommunicationHandler().getResponses(); }
public void start(String host, int port) throws Exception { Bootstrap b = new Bootstrap(); b.group(workerGroup); b.channel(NioSocketChannel.class); b.option(ChannelOption.SO_KEEPALIVE, true); b.remoteAddress(host, port); b.handler(initializer); // Start the client. channel = b.connect().syncUninterruptibly().channel(); System.out.println("Connected to [" + host + ':' + port + ']'); initializer.upgradeToHttp2IfNeeded(); }
public void sendRequest(FullHttpRequest request) { initializer.getCommunicationHandler().sendRequest(request, sslCtx, channel); }