Phoenix.SocketClient.Transport behaviour (phoenix_socket_client v0.8.1)

View Source

Behaviour for Phoenix Socket Client transport implementations.

Defines the interface for transport layers (WebSocket, etc.) that handle the underlying network connection for socket communication.

Summary

Callbacks

close(socket)

@callback close(socket :: pid()) :: :ok | {:ok, any()} | {:error, any()}

open(url, opts)

@callback open(url :: String.t(), opts :: Keyword.t()) :: {:ok, pid()} | {:error, any()}