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