public static class Handshake.Server$ extends java.lang.Object
|Modifier and Type||Field and Description|
Static reference to the singleton instance of this Scala object.
|Constructor and Description|
|Modifier and Type||Method and Description|
Validates a client WebSocket handshake.
public static final Handshake.Server$ MODULE$
public akka.util.OptionVal<UpgradeToWebSocketLowLevel> websocketUpgrade(scala.collection.immutable.List<HttpHeader> headers, boolean hostHeaderPresent, WebSocketSettings settings, akka.event.LoggingAdapter log)
1. An HTTP/1.1 or higher GET request, including a "Request-URI" [RFC2616] that should be interpreted as a /resource name/ defined in Section 3 (or an absolute HTTP/HTTPS URI containing the /resource name/).
2. A |Host| header field containing the server's authority.
3. An |Upgrade| header field containing the value "websocket", treated as an ASCII case-insensitive value.
4. A |Connection| header field that includes the token "Upgrade", treated as an ASCII case-insensitive value.
5. A |Sec-WebSocket-Key| header field with a base64-encoded (see Section 4 of [RFC4648]) value that, when decoded, is 16 bytes in length.
6. A |Sec-WebSocket-Version| header field, with a value of 13.
7. Optionally, an |Origin| header field. This header field is sent by all browser clients. A connection attempt lacking this header field SHOULD NOT be interpreted as coming from a browser client.
8. Optionally, a |Sec-WebSocket-Protocol| header field, with a list of values indicating which protocols the client would like to speak, ordered by preference.
9. Optionally, a |Sec-WebSocket-Extensions| header field, with a list of values indicating which extensions the client would like to speak. The interpretation of this header field is discussed in Section 9.1.
10. Optionally, other header fields, such as those used to send cookies or request authentication to a server. Unknown header fields are ignored, as per [RFC2616].
public HttpResponse buildResponse(Sec$minusWebSocket$minusKey key, scala.util.Either<akka.stream.Graph<akka.stream.FlowShape<FrameEvent,FrameEvent>,java.lang.Object>,akka.stream.Graph<akka.stream.FlowShape<Message,Message>,java.lang.Object>> handler, scala.Option<java.lang.String> subprotocol, WebSocketSettings settings, akka.event.LoggingAdapter log)