2.3 Exchanging WebSocket Messages
Sends a message through the WebSocket socket. The message can be either
a byte string, which will be sent with frame type 128 and length
information, or a string, which will be sent with frame type 0 and
without length information.
Returns a synchronizable event that becomes ready when data can be written to
the WebSocket socket and returns the socket itself when chosen.
Returns a synchronizable event that becomes ready when data can be written to
the WebSocket socket, sends the given frame when chosen and
returns a void value.
Receives a message through the WebSocket socket. The message returned
will be a byte string for frames of type 128 and a string for frames of
type 0. Any other frame type causes an error.
If the WebSocket connection is closed before ws-receive can read any data, the end of file object is returned instead.
Returns a synchronizable event that becomes ready when data can be read from
the WebSocket socket and returns the socket itself when chosen.
Returns a synchronizable event that becomes ready when data can be read from
the WebSocket socket and returns the incoming frame or an end of file
object when chosen.