WebSocketProtocol

korolev.http.protocol.WebSocketProtocol
See theWebSocketProtocol companion object
final class WebSocketProtocol[B]

Attributes

See also:
Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def addIntention[T](request: Request[T], intention: Intention): Request[T]
def decodeFrame(data: B): ((B, DecodingState), Action[B, Frame[B]])
def decodeFrames[F[_] : Effect](decoder: Decoder[F, B]): Decoder[F, Frame[B]]
def decodeFrames(buffer: B, state: DecodingState, incoming: B): ((B, DecodingState), Action[B, Frame[B]])
def encodeFrame(frame: Frame[B], maybeMask: Option[Int]): B
def encodeFrame(fin: Boolean, maybeMask: Option[Int], opcode: Int, payload: B): B
def findIntention(request: Head): Option[Intention]
def handshake[T](response: Response[T], intention: Intention): Response[T]
def mergeFrames[F[_] : Effect](decoder: Decoder[F, Frame[B]]): Decoder[F, Merged[B]]
def mergeFrames(buffer: Option[Merged[B]], incoming: Frame[B]): (Option[Merged[B]], Action[Frame[B], Merged[B]])

https://tools.ietf.org/html/rfc6455#section-5.4

def upgrade[F[_] : Effect](intention: Intention)(f: Request[Stream[F, Merged[B]]] => F[Response[Stream[F, Merged[B]]]]): Request[Stream[F, B]] => F[Response[Stream[F, B]]]

Upgrade Request/Response with raw bytes to WebSocket protocol and insert handshake headers. Fragments will be merged to single frames.

Upgrade Request/Response with raw bytes to WebSocket protocol and insert handshake headers. Fragments will be merged to single frames.

Attributes