trait WebSocketUpgrade extends AnyRef
An attribute that WebSocket requests will contain. Use WebSocketUpgrade.handleMessagesWith to create a WebSocket handshake response and handle the WebSocket message stream with the given handler.
This is a low-level API. You might want to use handleWebSocketMessages
instead as documented
at https://pekko.apache.org/docs/pekko-http/current/server-side/websocket-support.html#routing-support
- Source
- WebSocketUpgrade.scala
- Alphabetic
- By Inheritance
- WebSocketUpgrade
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def getRequestedProtocols(): Iterable[String]
Returns the sequence of protocols the client accepts.
Returns the sequence of protocols the client accepts.
See http://tools.ietf.org/html/rfc6455#section-1.9
- abstract def handleMessagesWith(inSink: Graph[SinkShape[Message], _], outSource: Graph[SourceShape[Message], _], subprotocol: String): HttpResponse
Returns a response that can be used to answer a WebSocket handshake request.
Returns a response that can be used to answer a WebSocket handshake request. The connection will afterwards use the given inSink to handle WebSocket messages from the client and the given outSource to send messages to the client.
The given subprotocol must be one of the ones offered by the client.
- abstract def handleMessagesWith(inSink: Graph[SinkShape[Message], _], outSource: Graph[SourceShape[Message], _]): HttpResponse
Returns a response that can be used to answer a WebSocket handshake request.
Returns a response that can be used to answer a WebSocket handshake request. The connection will afterwards use the given inSink to handle WebSocket messages from the client and the given outSource to send messages to the client.
- abstract def handleMessagesWith(handlerFlow: Graph[FlowShape[Message, Message], _], subprotocol: String): HttpResponse
Returns a response that can be used to answer a WebSocket handshake request.
Returns a response that can be used to answer a WebSocket handshake request. The connection will afterwards use the given handlerFlow to handle WebSocket messages from the client. The given subprotocol must be one of the ones offered by the client.
- abstract def handleMessagesWith(handlerFlow: Graph[FlowShape[Message, Message], _]): HttpResponse
Returns a response that can be used to answer a WebSocket handshake request.
Returns a response that can be used to answer a WebSocket handshake request. The connection will afterwards use the given handlerFlow to handle WebSocket messages from the client.