ShardRunner class
An internal class that contains the logic for running a shard.
This class handles opening the connection, heartbeating and any connection lifecycle events.
Constructors
- ShardRunner(ShardData data)
Properties
- canResume ↔ bool
-
Whether the current connection can be resumed.
getter/setter pair
- connection ↔ ShardConnection?
-
The current active connection.
getter/setter pair
- data → ShardData
-
The data needed for the shard to operate.
final
- disposing ↔ bool
-
Whether the shard is currently disposing and should not reconnect.
getter/setter pair
- gatewayUri ↔ Uri
-
The URI to use when connecting to the Gateway.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- heartbeatInterval ↔ Duration?
-
The interval between two heartbeats.
getter/setter pair
- heartbeatStopwatch ↔ Stopwatch?
-
The stopwatch timing the interval between a heartbeat being sent and a heartbeat ACK being received.
getter/setter pair
- heartbeatTimer ↔ Timer?
-
The current heartbeat timer.
getter/setter pair
- lastHeartbeatAcked ↔ bool
-
Whether the last heartbeat was ACKed.
getter/setter pair
- originalGatewayUri → Uri
-
The original URI to use when connecting to the Gateway for the first time or after an invalid session.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seq ↔ int?
-
The last seq number received.
getter/setter pair
- sessionId ↔ String?
-
The session ID from the latest READY event.
getter/setter pair
Methods
-
heartbeat(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
Stream< GatewayMessage> messages) → Stream<ShardMessage> - Run the shard runner.
-
sendIdentify(
) → Future< void> -
sendResume(
) → Future< void> -
startHeartbeat(
) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited