View Source Yggdrasil.Subscriber.Adapter.Icon.WebSocket (ICON 2.0 SDK v0.2.3)

This module defines a general ICON 2.0 WebSocket.

Link to this section Summary

Functions

Initializes websocket connection with a message.

Starts a websocket connection with an url and some options.

Stops websocket.

Link to this section Functions

Link to this function

initialize(websocket, message)

View Source
@spec initialize(WebSockex.client(), term()) :: :ok

Initializes websocket connection with a message.

Link to this function

start_link(url, options)

View Source
@spec start_link(
  binary(),
  keyword()
) :: {:ok, pid()} | {:error, term()}

Starts a websocket connection with an url and some options.

Non WebSockex options:

  • decoder: a frame decoder function.
@spec stop(WebSockex.client()) :: :ok

Stops websocket.