public void closeConnection() {
socketWrapper.getShutdownRelay().sendSignal(null, new Exception("UI close request"));
}
});
}
LoggableOutputStream output = socketWrapper.getLoggableOutput();
writeHttpLine(output, "GET " + resource + " HTTP/1.1");
writeHttpLine(output, "User-Agent: ChromeDevTools for Java SDK");
writeHttpLine(output, "Host: " + socketAddress.getHostName() + ":" +
socketAddress.getPort());
writeHttpLine(output, "");
output.getOutputStream().flush();
LoggableInputStream input = socketWrapper.getLoggableInput();
HandshakeUtil.HttpResponse httpResponse =
HandshakeUtil.readHttpResponse(HandshakeUtil.createLineReader(input.getInputStream()));