WsLimits class
What a hub will accept before it stops being polite.
The defaults are sized for a lab session or a handful of friends, not for a public service. They exist so that a single misbehaving or malicious peer cannot make the hub allocate without bound — everything else about the hub's safety comes from the fact that only authenticated peers get in.
Constructors
Properties
- handshakeTimeout → Duration
-
How long a connection may stay unauthenticated before it is dropped.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxConnections → int
-
Concurrent connections, authenticated or not.
final
- maxEndpointsPerConnection → int
-
Endpoints one connection may register. A node holds one for its
coordination stream plus one per data stream.
final
- maxFrameBytes → int
-
Largest single WebSocket frame, in bytes.
final
- maxLiveQueriesPerConnection → int
-
Continuous queries one connection may keep open.
final
- maxPeers → int
-
Registered endpoints across the whole hub. Also bounds slot allocation.
final
- pingInterval → Duration
-
WebSocket ping interval. Without this a half-open socket holds its
endpoint ids, slot and routes until the OS notices, which may be never.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{int? maxFrameBytes, Duration? handshakeTimeout, Duration? pingInterval, int? maxConnections, int? maxEndpointsPerConnection, int? maxLiveQueriesPerConnection, int? maxPeers}) → WsLimits -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultMaxFrameBytes → const int
- 1 MiB. Comfortably above any coordination message or realistic sample — a 1024-channel float64 sample is 8206 bytes — and small enough that a rejected frame costs nothing.