View Source Nostrum.Struct.WSState (Nostrum v0.6.0)
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
Stream reference for :gun
Reference to the current zlib context
Link to this section Types
Specs
conn() :: pid()
PID of the :gun
worker connected to the websocket
Specs
conn_pid() :: pid()
PID of the connection process
Specs
gateway() :: String.t()
Gateway URL
Specs
heartbeat_ack() :: boolean()
Whether or not the last hearbeat sent was ACK'd
Specs
heartbeat_interval() :: pos_integer() | nil
Interval at which heartbeats are sent
Specs
heartbeat_ref() :: :timer.tref() | nil
Time ref for the heartbeat
Specs
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
Specs
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
Specs
seq() :: integer() | nil
The sequence number of the last event
Specs
session() :: integer() | nil
The session id
Specs
shard_num() :: non_neg_integer()
The shard number
Specs
shard_pid() :: pid()
PID of the shard containing this state
Specs
stream() :: :gun.stream_ref()
Stream reference for :gun
Specs
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(), stream: stream(), zlib_ctx: zlib_ctx() }
Specs
zlib_ctx() :: reference() | nil
Reference to the current zlib context