MqttServerWs2Connection class
The MQTT server alternative websocket connection class
- Inheritance
-
- Object
- MqttConnectionBase
- MqttServerConnection
- MqttServerWs2Connection
Constructors
-
MqttServerWs2Connection(SecurityContext? context, EventBus? eventBus, List<
RawSocketOption> socketOptions) - Default constructor
-
MqttServerWs2Connection.fromConnect(String server, int port, EventBus eventBus, List<
RawSocketOption> socketOptions) - Initializes a new instance of the MqttServerWs2Connection class.
Properties
- client ↔ dynamic
-
The socket that maintains the connection to the MQTT broker.
getter/setter pairinherited
- clientEventBus ↔ EventBus?
-
The event bus
getter/setter pairinherited
- context ↔ SecurityContext?
-
The security context for secure usage
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- messageStream ↔ MqttByteBuffer
-
The read buffer
getter/setter pairinherited
- onDisconnected ↔ DisconnectCallback?
-
Unsolicited disconnection callback
getter/setter pairinherited
-
protocols
↔ List<
String> -
The websocket subprotocol list
getter/setter pair
- 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 pairinherited
Methods
-
connect(
String server, int port) → Future< MqttConnectionStatus?> -
Connect
override
-
connectAuto(
String server, int port) → Future< MqttConnectionStatus?> -
Connect Auto
override
-
disconnect(
{bool auto = false}) → void -
User requested or auto disconnect disconnection
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.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited