Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
c

WebSocketOrigin

class WebSocketOrigin

An exact browser origin allowed to open a Scalive WebSocket.

Origins contain an HTTP or HTTPS scheme, a canonical lowercase host, and an effective port. Default ports are normalized, so https://example.com and https://example.com:443 describe the same origin.

Parameters

scheme

The canonical http or https scheme.

host

The canonical lowercase ASCII host, without IPv6 brackets.

port

The effective port, including 80 or 443 when omitted from the serialized origin.

Defined by scalive.WebSocketOrigin. View source (scalive/transport/zio-http/src/scalive/WebSocketOrigin.scala:19-39)

Methods1

toString

def toString: String

Serializes the origin as a browser sends it, such as https://example.com, omitting the scheme's default port.

Defined by scalive.WebSocketOrigin.toString. View source (scalive/transport/zio-http/src/scalive/WebSocketOrigin.scala:36-39)

Values3

host

val host: String

The canonical lowercase ASCII host, without IPv6 brackets.

Defined by scalive.WebSocketOrigin.host. View source (scalive/transport/zio-http/src/scalive/WebSocketOrigin.scala:21-21)

port

val port: Int

The effective port, including 80 or 443 when omitted from the serialized origin.

Defined by scalive.WebSocketOrigin.port. View source (scalive/transport/zio-http/src/scalive/WebSocketOrigin.scala:22-22)

scheme

val scheme: String

The canonical http or https scheme.

Defined by scalive.WebSocketOrigin.scheme. View source (scalive/transport/zio-http/src/scalive/WebSocketOrigin.scala:20-20)