package ws
- Alphabetic
- Public
- Protected
Type Members
- sealed trait BinaryMessage extends javadsl.model.ws.BinaryMessage with Message
Represents a WebSocket binary message.
Represents a WebSocket binary message. A binary message can either be BinaryMessage.Strict in which case the complete data is already available or it can be BinaryMessage.Streamed in which case
dataStream
will return a Source streaming the data as it comes in. - final case class InvalidUpgradeResponse(response: HttpResponse, cause: String) extends WebSocketUpgradeResponse with Product with Serializable
- sealed trait Message extends javadsl.model.ws.Message
The ADT for WebSocket messages.
The ADT for WebSocket messages. A message can either be a binary or a text message.
- class PeerClosedConnectionException extends RuntimeException with javadsl.model.ws.PeerClosedConnectionException
A PeerClosedConnectionException will be reported to the WebSocket handler if the peer has closed the connection.
A PeerClosedConnectionException will be reported to the WebSocket handler if the peer has closed the connection.
closeCode
andcloseReason
contain close messages as reported by the peer. - sealed trait TextMessage extends javadsl.model.ws.TextMessage with Message
Represents a WebSocket text message.
Represents a WebSocket text message. A text message can either be a TextMessage.Strict in which case the complete data is already available or it can be TextMessage.Streamed in which case
textStream
will return a Source streaming the data as it comes in. - final case class ValidUpgrade(response: HttpResponse, chosenSubprotocol: Option[String]) extends WebSocketUpgradeResponse with Product with Serializable
- final case class WebSocketRequest(uri: Uri, extraHeaders: Seq[HttpHeader] = Nil, subprotocol: Option[String] = None) extends Product with Serializable
Represents a WebSocket request.
Represents a WebSocket request.
- uri
The target URI to connect to.
- extraHeaders
Extra headers to add to the WebSocket request.
- subprotocol
WebSocket subprotocols (comma separated) if required.
- trait WebSocketUpgrade extends javadsl.model.ws.WebSocketUpgrade
An attribute that will be added to an WebSocket upgrade HttpRequest that enables a request handler to upgrade this connection to a WebSocket connection and registers a WebSocket handler.
An attribute that will be added to an WebSocket upgrade HttpRequest that enables a request handler to upgrade this connection to a WebSocket connection and registers a WebSocket handler.
This is a low-level API. You might want to use
handleWebSocketMessages
instead as documented at https://doc.akka.io/libraries/akka-http/current/server-side/websocket-support.html#routing-support - sealed trait WebSocketUpgradeResponse extends AnyRef
Represents the response to a websocket upgrade request.
Represents the response to a websocket upgrade request. Can either be ValidUpgrade or InvalidUpgradeResponse.
Deprecated Type Members
- trait UpgradeToWebSocket extends HttpHeader with javadsl.model.ws.UpgradeToWebSocket with WebSocketUpgrade
A custom header that will be added to an WebSocket upgrade HttpRequest that enables a request handler to upgrade this connection to a WebSocket connection and registers a WebSocket handler.
A custom header that will be added to an WebSocket upgrade HttpRequest that enables a request handler to upgrade this connection to a WebSocket connection and registers a WebSocket handler.
- Annotations
- @deprecated
- Deprecated
(Since version 10.2.0) This low-level API has been replaced by an attribute.
Value Members
- object BinaryMessage
- object TextMessage
- object WebSocketRequest extends Serializable