Wampex.Client.Session (wampex_client v0.2.0)

A state machine based process for managing a WAMP Session. Utilizes StatesLanguage to implement the gen_statem process. See priv/session.json for the JSON representation

Summary

Types

t()

@type t() :: %Wampex.Client.Session{
  challenge: Wampex.Roles.Peer.Challenge.t() | nil,
  connected: boolean(),
  error: binary(),
  event: Wampex.Roles.Broker.Event.t() | nil,
  goodbye: binary() | nil,
  id: integer() | nil,
  interrupt: integer() | nil,
  invocation: Wampex.Roles.Dealer.Invocation.t() | nil,
  message: Wampex.message() | nil,
  message_queue: [],
  name: module() | nil,
  protocol: binary(),
  realm: Wampex.Client.Realm.t(),
  request_id: integer(),
  requests: [],
  roles: [module()],
  serializer: module(),
  transport: module(),
  transport_pid: pid() | module() | nil,
  url: binary()
}

Functions

call(pid, event)

See :gen_statem.call/2.

call(pid, event, timeout)

See :gen_statem.call/3.

cast(pid, event)

See :gen_statem.cast/2.

cast_send_request(name, request)

@spec cast_send_request(name :: atom() | pid(), request :: Wampex.message()) :: :ok

cast_send_request(name, request, pid)

@spec cast_send_request(
  name :: atom() | pid(),
  request :: Wampex.message(),
  from :: pid()
) :: :ok

child_spec(opts)

connected?(name)

@spec connected?(name :: atom()) :: true | false

do_init(start, parent, parent_data, data)

get_start_state(start, override)

remove_cast_requests(requests)

send_request(name, request, timeout)

@spec send_request(
  name :: atom() | pid(),
  request :: Wampex.message(),
  timeout :: integer()
) :: term()

start(data)

start(data, opts)

start(name, data, opts)

start_link(data)

start_link(data, opts)

start_link(name, data, opts)