ConnectionId class
A SpacetimeDB connection identifier: one live client socket.
A single Identity can hold several concurrent connections (multiple
windows, desktop plus mobile, or a client that deliberately opens more than
one socket), so a ConnectionId is the natural key for per-connection
presence tables.
Wire form is a 128-bit unsigned integer, 16 bytes little-endian, which is
the order bytes holds. The conventional hex string is big-endian — the
reverse of bytes — matching upstream to_hex/from_hex.
Constructors
- ConnectionId(Uint8List bytes)
- Create a connection id from 16 little-endian wire bytes.
- ConnectionId.fromBigEndianBytes(Uint8List beBytes)
-
Create a connection id from 16 big-endian bytes, as written in hex.
factory
- ConnectionId.fromHexString(String hex)
-
Parse the 32-character big-endian hex form.
factory
Properties
- bigEndianBytes → Uint8List
-
The 16 bytes in big-endian order, most significant first.
no setter
- bytes → Uint8List
-
The raw 16 bytes in wire (little-endian) order.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toAbbreviated → String
-
Shortened hex form for UI display: the first 16 big-endian hex characters.
no setter
- toHexString → String
-
Full 32-character big-endian hex string.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
String hex) → ConnectionId
Constants
- byteLength → const int