module

Hop::WssBearer

The WSS Internet bearer. Frame headers and cumulative fragments are bounded before payload allocation because the stdlib HTTP::WebSocket runner otherwise grows an unbounded IO::Memory.

Constants

HANDSHAKE_TIMEOUT = 5.seconds
HANDSHAKE_WORKERS = 8
MAX_HEADER_BYTES = 16 << 10
MAX_MESSAGE_BYTES = 1 << 20
MAX_PENDING_CONNECTIONS = 64
READ_TIMEOUT = 15.seconds

Class methods

apply_timeout(io : IO, timeout : Time::Span) : Nil
Source
attach_ws(endpoint : Endpoint, ws : HTTP::WebSocket, role : Symbol) : UInt64
Source
connect(uri : URI, tls : HTTP::Client::TLSContext) : BoundedWebSocket
Source
dial(endpoint : Endpoint, wss_url : String, insecure_tls : Bool = false) : HTTP::WebSocket
Source
serve(endpoint : Endpoint, port : Int32, tls : OpenSSL::SSL::Context::Server, public_url : String, ttl_secs : UInt32 = 3600_u32, host : String = "0.0.0.0") : HTTP::Server
Source

Nested types