Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
GitHub
o

WebSocketOrigin

object WebSocketOrigin

Constructors and strict parsing for WebSocketOrigin.

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

Methods5

http

def http(host: String, port: Int = ...): WebSocketOrigin

Creates an HTTP origin from trusted program input.

Throws

ValidationException

when the host or port is invalid

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

httpEither

def httpEither(host: String, port: Int = ...): Either[WebSocketOrigin.Error, WebSocketOrigin]

Creates an HTTP origin with dynamic host or port failures in the typed error channel.

Defined by scalive.WebSocketOrigin.httpEither. View source (scalive/transport/zio-http/src/scalive/WebSocketOrigin.scala:77-78)

https

def https(host: String, port: Int = ...): WebSocketOrigin

Creates an HTTPS origin from trusted program input.

Throws

ValidationException

when the host or port is invalid

Defined by scalive.WebSocketOrigin.https. View source (scalive/transport/zio-http/src/scalive/WebSocketOrigin.scala:73-74)

httpsEither

def httpsEither(host: String, port: Int = ...): Either[WebSocketOrigin.Error, WebSocketOrigin]

Creates an HTTPS origin with dynamic host or port failures in the typed error channel.

Defined by scalive.WebSocketOrigin.httpsEither. View source (scalive/transport/zio-http/src/scalive/WebSocketOrigin.scala:81-82)

parse

def parse(value: String): Either[WebSocketOrigin.Error, WebSocketOrigin]

Strictly parses one serialized browser origin for deployment configuration or admission.

User information, paths, queries, fragments, opaque origins, Unicode hosts, surrounding whitespace, and non-HTTP schemes are rejected.

Defined by scalive.WebSocketOrigin.parse. View source (scalive/transport/zio-http/src/scalive/WebSocketOrigin.scala:89-126)