ShspPeer class

SHSP Peer implementation

Implementers

Constructors

ShspPeer({required PeerInfo remotePeer, required IShspSocket socket})
ShspPeer.create({required PeerInfo remotePeer, required IShspSocket socket})
Factory constructor - creates a ShspPeer with a remote peer and socket
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
remotePeer → PeerInfo
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socket → IShspSocket
final

Methods

close() → void
Close the peer connection
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMessage(List<int> msg, PeerInfo info) → void
Internal callback triggered when a message arrives for this peer
sendMessage(List<int> message) → void
Send a message to this peer
serializedObject() String
Get a serialized representation of the peer
setMessageCallback(MessageCallback cb) → void
Register a callback for receiving messages from this peer
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited