TcpAmiDataSource class

TCP socket implementation of AmiDataSource.

Wraps a raw TCP socket connection with buffering and message parsing.

Implemented types

Constructors

TcpAmiDataSource({AmiProtocolParser? parser})

Properties

connectionStateStream Stream<ConnectionState>
Stream of connection state changes.
no setteroverride
currentConnection ConnectionInfo?
Current connection info (null if not connected).
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
messageStream Stream<AmiMessage>
Stream of all incoming messages.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

connect(String host, int port) Future<ConnectionInfo>
Connects to the AMI server.
override
disconnect() Future<void>
Disconnects from the server.
override
dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendAction(AmiAction action) Future<void>
Sends an action to the server.
override
toString() String
A string representation of this object.
inherited
waitForGreeting() Future<String>
Waits for the greeting message.
override
waitForResponse(String actionId, {Duration? timeout}) Future<AmiResponse>
Waits for a response matching the given action ID.
override

Operators

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