package websocket
- Source
- package.scala
- Alphabetic
- By Inheritance
- websocket
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- sealed trait Frame [A] extends AnyRef
-
case class
WebSocketRequest
(hostPort: HostPort, header: HttpRequestHeader, secure: Boolean) extends Product with Serializable
Request to establish websocket connection from the client
Request to establish websocket connection from the client
- hostPort
Host (port) of the server
- header
Any Header information. Note that Method will be always GET replacing any other method configured. Also any WebSocket Handshake headers will be overriden.
- secure
True, if the connection shall be secure (wss)
Value Members
-
def
server[F[_], I, O](pipe: Pipe[F, Frame[I], Frame[O]], pingInterval: Duration = 30.seconds, handshakeTimeout: FiniteDuration = 10.seconds)(header: HttpRequestHeader, input: Stream[F, Byte])(implicit arg0: Concurrent[F], arg1: Timer[F], arg2: Decoder[I], arg3: Encoder[O]): Stream[F, HttpResponse[F]]
Creates a websocket to be used on server side.
Creates a websocket to be used on server side.
Implementation is according to RFC-6455 (https://tools.ietf.org/html/rfc6455).
- pipe
A websocket pipe.
I
is received from the client andO
is sent to client. Decoder (for I) and Encoder (for O) must be supplied. Note that this function may evaluate on the left, to indicate response to the client before the handshake took place (i.e. Unauthorized).- pingInterval
An interval for the Ping / Pong protocol.
- handshakeTimeout
An timeout to await for handshake to be successfull. If the handshake is not completed within supplied period, connection is terminated.
- object Frame
- object WebSocket
- object WebSocketRequest extends Serializable