Mint.WebSocket.new

You're seeing just the function new, go back to Mint.WebSocket module for more information.
Link to this function

new(conn, request_ref, status, response_headers)

View Source

Specs

Creates a new WebSocket data structure given the server's reply to the upgrade request

This function will setup any extensions accepted by the server using the Mint.WebSocket.Extension.init/2 callback.

Examples

http_reply = receive(do: (message -> message))
{:ok, conn, [{:status, ^ref, status}, {:headers, ^ref, headers}, {:done, ^ref}]} =
  Mint.HTTP.stream(conn, http_reply)

{:ok, conn, websocket} =
  Mint.WebSocket.new(conn, ref, status, resp_headers)