RemoteClient class

Client for connecting to a remote Neomage session.

Constructors

RemoteClient({required String url, String? authToken, RemoteAuthMethod authMethod = RemoteAuthMethod.token, int maxReconnectAttempts = 10, Duration heartbeatInterval = const Duration(seconds: 30), Duration reconnectDelay = const Duration(seconds: 2)})

Properties

events Stream<RemoteEvent>
Remote event stream.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionInfo RemoteSessionInfo?
Current session info.
no setter
state RemoteSessionState
Current connection state.
no setter

Methods

connect() Future<void>
Connect to the remote session.
disconnect() Future<void>
Disconnect from the remote session.
dispose() → void
Dispose resources.
getStatus() Future<RemoteMessage>
Request remote session status.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendChatMessage(String content) Future<RemoteMessage>
Send a chat message to the remote session.
sendEvent(String action, Map<String, dynamic> payload) → void
Send a fire-and-forget event.
sendRequest(String action, Map<String, dynamic> payload, {Duration timeout = const Duration(seconds: 30)}) Future<RemoteMessage>
Send a message and wait for a response.
toString() String
A string representation of this object.
inherited

Operators

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