UpgradeToWebSocket

akka.http.scaladsl.model.ws.UpgradeToWebSocket

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.

Attributes

Deprecated
[Since version 10.2.0]
Source
UpgradeToWebSocket.scala
Graph
Supertypes
class HttpHeader
class HttpHeader
class Object
trait Matchable
class Any
Show all

Members list

Value members

Abstract methods

override def handleMessages(handlerFlow: Graph[FlowShape[Message, Message], Any], subprotocol: Option[String]): HttpResponse

The high-level interface to create a WebSocket server based on "messages".

The high-level interface to create a WebSocket server based on "messages".

Returns a response to return in a request handler that will signal the low-level HTTP implementation to upgrade the connection to WebSocket and use the supplied handler to handle incoming WebSocket messages.

Optionally, a subprotocol out of the ones requested by the client can be chosen.

Attributes

Definition Classes
Source
UpgradeToWebSocket.scala
override def requestedProtocols: Seq[String]

A sequence of protocols the client accepts.

A sequence of protocols the client accepts.

See http://tools.ietf.org/html/rfc6455#section-1.9

Attributes

Definition Classes
Source
UpgradeToWebSocket.scala

Concrete methods

override def getRequestedProtocols(): Iterable[String]

Java API

Java API

Attributes

Definition Classes
Source
UpgradeToWebSocket.scala
override def handleMessagesWith(handlerFlow: Graph[FlowShape[Message, Message], _]): HttpResponse

Java API

Java API

Attributes

Definition Classes
Source
UpgradeToWebSocket.scala
override def handleMessagesWith(handlerFlow: Graph[FlowShape[Message, Message], _], subprotocol: String): HttpResponse

Java API

Java API

Attributes

Definition Classes
Source
UpgradeToWebSocket.scala
override def handleMessagesWith(inSink: Graph[SinkShape[Message], _], outSource: Graph[SourceShape[Message], _]): HttpResponse

Java API

Java API

Attributes

Definition Classes
Source
UpgradeToWebSocket.scala
override def handleMessagesWith(inSink: Graph[SinkShape[Message], _], outSource: Graph[SourceShape[Message], _], subprotocol: String): HttpResponse

Java API

Java API

Attributes

Definition Classes
Source
UpgradeToWebSocket.scala
override def handleMessagesWithSinkSource(inSink: Graph[SinkShape[Message], Any], outSource: Graph[SourceShape[Message], Any], subprotocol: Option[String]): HttpResponse

The high-level interface to create a WebSocket server based on "messages".

The high-level interface to create a WebSocket server based on "messages".

Returns a response to return in a request handler that will signal the low-level HTTP implementation to upgrade the connection to WebSocket and use the supplied inSink to consume messages received from the client and the supplied outSource to produce message to sent to the client.

Optionally, a subprotocol out of the ones requested by the client can be chosen.

Attributes

Definition Classes
Source
UpgradeToWebSocket.scala

Inherited methods

def is(nameInLowerCase: String): Boolean

Attributes

Inherited from:
HttpHeader
Source
HttpHeader.scala
def isNot(nameInLowerCase: String): Boolean

Attributes

Inherited from:
HttpHeader
Source
HttpHeader.scala

Attributes

Inherited from:
HttpHeader
Source
HttpHeader.scala
def name: String

Attributes

Inherited from:
HttpHeader
Source
HttpHeader.scala

Attributes

Inherited from:
HttpHeader

Attributes

Inherited from:
HttpHeader
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
ToStringRenderable -> Any
Inherited from:
ToStringRenderable (hidden)
Source
Rendering.scala

Attributes

Inherited from:
HttpHeader
Source
HttpHeader.scala
def value: String

Attributes

Inherited from:
HttpHeader
Source
HttpHeader.scala