Nostrum v0.4.0 Nostrum.Struct.WSState View Source

Struct representing the current WS state.

Link to this section Summary

Types

PID of the :gun worker connected to the websocket

PID of the connection process

Gateway URL

Whether or not the last hearbeat sent was ACK'd

Interval at which heartbeats are sent

Time ref for the heartbeat

The time the last heartbeat was acknowledged, will be nil if a heartbeat hasn't been ACK'd yet

The time the last heartbeat was sent, if a heartbeat hasn't been sent it will be the time the websocket process was started

The sequence number of the last event

The session id

The shard number

PID of the shard containing this state

t()

Reference to the current zlib context

Link to this section Types

PID of the :gun worker connected to the websocket

Link to this type

conn_pid() View Source
conn_pid() :: pid()

PID of the connection process

Gateway URL

Link to this type

heartbeat_ack() View Source
heartbeat_ack() :: boolean()

Whether or not the last hearbeat sent was ACK'd

Link to this type

heartbeat_interval() View Source
heartbeat_interval() :: integer() | nil

Interval at which heartbeats are sent

Link to this type

heartbeat_ref() View Source
heartbeat_ref() :: integer() | nil

Time ref for the heartbeat

Link to this type

last_heartbeat_ack() View Source
last_heartbeat_ack() :: DateTime.t() | nil

The time the last heartbeat was acknowledged, will be nil if a heartbeat hasn't been ACK'd yet

Link to this type

last_heartbeat_send() View Source
last_heartbeat_send() :: DateTime.t()

The time the last heartbeat was sent, if a heartbeat hasn't been sent it will be the time the websocket process was started

The sequence number of the last event

Link to this type

session() View Source
session() :: integer() | nil

The session id

Link to this type

shard_num() View Source
shard_num() :: String.t()

The shard number

Link to this type

shard_pid() View Source
shard_pid() :: pid()

PID of the shard containing this state

Link to this type

t() View Source
t() :: %Nostrum.Struct.WSState{
  conn: conn(),
  conn_pid: conn_pid(),
  gateway: gateway(),
  heartbeat_ack: heartbeat_ack(),
  heartbeat_interval: heartbeat_interval(),
  heartbeat_ref: heartbeat_ref(),
  last_heartbeat_ack: last_heartbeat_ack(),
  last_heartbeat_send: last_heartbeat_send(),
  seq: seq(),
  session: session(),
  shard_num: shard_num(),
  shard_pid: shard_pid(),
  zlib_ctx: zlib_ctx()
}

Link to this type

zlib_ctx() View Source
zlib_ctx() :: reference() | nil

Reference to the current zlib context