public class WebSocketHandler extends java.lang.Object implements HttpHandler
HttpHandler harness.
The way this works is that we pump the request directly into our WebSocket implementation and force write the response out to the connection without returning. Then, we extract the remaining buffered input stream bytes from the socket and stitch them together with the raw sockets input stream and pass everything onto the WebSocket engine which blocks until WebSocket orderly shutdown.
| Constructor and Description |
|---|
WebSocketHandler(SimpleEndpoint endpoint) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
handleRequest(SocketLike socket,
LightHttpRequest request,
LightHttpResponse response) |
public WebSocketHandler(SimpleEndpoint endpoint)
public boolean handleRequest(SocketLike socket, LightHttpRequest request, LightHttpResponse response) throws java.io.IOException
handleRequest in interface HttpHandlerjava.io.IOException