Mint.WebSocket.encode
You're seeing just the function
encode
, go back to Mint.WebSocket module for more information.
Specs
Encodes a frame into a binary
The resulting binary may be sent with Mint.HTTP.stream_request_body/3
.
This function will invoke the Mint.WebSocket.Extension.encode/2
callback
for any accepted extensions.
Examples
{:ok, websocket, data} = Mint.WebSocket.encode(websocket, {:text, "hello world"})
{:ok, conn} = Mint.HTTP.stream_request_body(conn, ref, data)