Same as handleSocketThroughPipeWithFragmentation(), but assumes all frames are no continuations.
Same as handleSocketThroughPipeWithFragmentation(), but assumes all frames are no continuations.
the effect type
the websocket to handle
if true, then automatically handle sending pongs on pings (which are then not passed to the pipe)
the pipe to handle the socket
an Unit effect describing the full run of the websocket through the pipe
Handle the websocket through a Pipe which receives the incoming events and produces the messages to be sent to the server.
Handle the websocket through a Pipe which receives the incoming events and produces the messages to be sent to the server. Not that by the nature of a Pipe, there no need that these two streams are coupled. Just make sure to consume the input as otherwise the receiving buffer might overflow (use Stream.drain if you want to discard). Messages to be sent need to be coupled with a Boolean indicating whether this frame is a continuation, see WebSocket.send().
the effect type
the websocket to handle
if true, then automatically handle sending pongs on pings (which are then not passed to the pipe)
the pipe to handle the socket
an Unit effect describing the full run of the websocket through the pipe
Like handleSocketThroughPipe() but extracts the contents of incoming text messages and wraps outgoing messages in text frames.
Like handleSocketThroughPipe() but extracts the contents of incoming text messages and wraps outgoing messages in text frames. Helpful for implementing text-only protocols. Note: It always sends a pong for any received ping.
the effect type
the websocket to handle
the pipe to handle the socket
an Unit effect describing the full run of the websocket through the pipe