MqttServerConnection<T extends Object> class abstract

The MQTT client server connection base class

Inheritance
Implementers

Constructors

MqttServerConnection(EventBus? clientEventBus, List<RawSocketOption> socketOptions, Duration? socketTimeout)
Default constructor
MqttServerConnection.fromConnect(dynamic server, int port, dynamic clientEventBus, List<RawSocketOption> socketOptions, Duration? socketTimeout)
Initializes a new instance of the MqttConnection class.

Properties

client ↔ T?
The socket that maintains the connection to the MQTT broker.
getter/setter pairinherited
clientEventBus ↔ EventBus?
The event bus
getter/setter pairinherited
hashCode → int
The hash code for this object.
no setterinherited
listeners ↔ List<StreamSubscription>
The stream controller as returned when clients listen.
getter/setter pairinherited
messageStream ↔ MqttByteBuffer
The read buffer
getter/setter pairinherited
readWrapper ↔ MqttReadWrapper
The read wrapper
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
socketOptions ↔ List<RawSocketOption>
Socket options, applicable only to TCP sockets
getter/setter pair
socketTimeout ↔ Duration?
Socket timeout duration.
getter/setter pair

Methods

closeClient() → void
Closes the socket immediately, must be overridden in connection classes
inherited
connect(String server, int port) → Future<void>
Connect, must be overridden in connection classes
override
connectAuto(String server, int port) → Future<void>
Connect for auto reconnect , must be overridden in connection classes
override
disconnect({bool auto = false}) → void
User requested or auto disconnect disconnection
inherited
disposeClient() → void
Closes and dispose the socket immediately, must be overridden in connection classes
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDone() → void
OnDone listener callback
inherited
onError(dynamic error) → void
OnError listener callback
inherited
send(MqttByteBuffer message) → void
Sends the message in the stream to the broker.
stopListening() → void
Stops listening on the socket immediately, must be overridden in connection classes
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

eTimedOut → const int
wsaETimedOut → const int
Socket timeout OS error codes.