MessageSender class

Handles message sending with retries and failover

Constructors

MessageSender({required Host host, required SFClientConfig config, required ServerSelector serverSelector})

Properties

config → SFClientConfig
final
hashCode → int
The hash code for this object.
no setterinherited
host → Host
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serverSelector → ServerSelector
final

Methods

getStats() → Map<String, dynamic>
Get statistics
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetStats() → void
Reset statistics
sendDirect(PeerId recipient, Uint8List payload, MessagePriority priority, Duration? expiry, {String? folderPath, bool persistent = false}) → Future<SendResult>
Attempt direct delivery to recipient
sendMessage({required PeerId recipient, required Uint8List payload, String? folderPath, MessagePriority priority = MessagePriority.normal, Duration? expiry, bool persistent = false, bool tryDirectFirst = true, String? messageId, SFMessageFlags flags = SFMessageFlags.none}) → Future<SendResult>
Send message with automatic retry and failover
sendViaServer(PeerId serverId, PeerId recipient, Uint8List payload, MessagePriority priority, Duration? expiry, {String? folderPath, bool persistent = false, String? messageId, SFMessageFlags flags = SFMessageFlags.none}) → Future<SendResult>
Send message via specific S&F server
toString() → String
A string representation of this object.
inherited

Operators

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