View Source Sock.Socket protocol (Sock v0.2.0)
A protocol to provide the ability for Sock
implementations to send data to a connected
WebSocket client. An instance of an (otherwise opaque) type conforming to this protocol is
passed in to Sock
implementations as the first argument of most Sock
callbacks.
Link to this section Summary
Functions
Sends the specified data to the client as a binary frame(s).
Sends the data to the client within a ping frame.
Sends the data to the client within a pong frame. Note that Sock
implementation should not
send pong frames in response to ping frames on their own, since the backing implementation is expected
to do this automatically. This function is present solely for purpose of proactively sending
pong frames as a unidirectional heartbeat per RFC6455§5.3.3.
Sends the specified data to the client as a text frame(s).
Link to this section Types
@type t() :: term()
Link to this section Functions
Sends the specified data to the client as a binary frame(s).
An implementation is permitted to send this data as one or more binary / continuation frames at its discretion.
Sends the data to the client within a ping frame.
Sends the data to the client within a pong frame. Note that Sock
implementation should not
send pong frames in response to ping frames on their own, since the backing implementation is expected
to do this automatically. This function is present solely for purpose of proactively sending
pong frames as a unidirectional heartbeat per RFC6455§5.3.3.
Sends the specified data to the client as a text frame(s).
An implementation is permitted to send this data as one or more text / continuation frames at its discretion.