creates the handshake response to complete websocket handshake on server side *
Creates control stream.
Creates control stream. When control stream terminates WebSocket will terminate too.
This takes ping-pong stream, for each Ping, this responds with Pong. For each Pong received this zeroes number of pings sent.
Stream of ping pongs received
A metronome that emits time to send Ping
Max unanswered pings to await before the stream terminates.
Augments header to be correct for Websocket request (adding Sec-WebSocket-Key header) and returnng the correct header with expected SHA-1 response from the server
Augments header to be correct for Websocket request (adding Sec-WebSocket-Key header) and returnng the correct header with expected SHA-1 response from the server
Random generator of 16 byte websocket keys
Cuts necessary data for decoding the frame, done by partially decoding the frame Empty if the data couldn't be decoded yet
Cuts necessary data for decoding the frame, done by partially decoding the frame Empty if the data couldn't be decoded yet
Current buffer that may contain full frame
Decodes websocket frame.
Decodes websocket frame.
This will fail when the frame failed to be decoded or when frame is larger than
supplied maxFrameSize
parameter.
Maximum size of the frame, including its header.
Encodes incoming frames to wire format.
Encodes received frome to WebSocketFrame.
Encodes received frome to WebSocketFrame.
A funtion that allows to generate random masking key. Masking is applied at client -> server direction only.
random generator, ascii compatible *
Validates response received.
Validates response received. If other than 101 status code is received, this evaluates to Some() If fingerprint won't match or the websocket headers wont match the request, this fails.
Sent request header
received header
expected fingerprint in header
Verifies validity of WebSocket header request (on server) and extracts WebSocket key
Collects incoming frames.
Collects incoming frames. to produce and deserialize Frame[A].
Also interprets WebSocket operations.
A
.
Queue to notify about ping/pong frames.
Creates websocket of supplied pipe
Creates websocket of supplied pipe
If Finite, defines duration when keep-alive pings are sent to client If client won't respond with pong to 3x this internal, the websocket will be terminated by server.
When true, this represent client -> server direction, when false this represents reverse direction