MqttServerSecureConnection class
The MQTT server secure connection class
- Inheritance
-
- Object
- MqttConnectionBase<
SecureSocket> - MqttServerConnection<
SecureSocket> - MqttServerSecureConnection
Constructors
-
MqttServerSecureConnection(SecurityContext? context, EventBus? eventBus, bool onBadCertificate(X509Certificate certificate)?, List<
RawSocketOption> socketOptions) - Default constructor
-
MqttServerSecureConnection.fromConnect(String server, int port, EventBus eventBus, List<
RawSocketOption> socketOptions) - Initializes a new instance of the MqttSecureConnection class.
Properties
- client ↔ SecureSocket?
-
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
-
listeners
↔ List<
StreamSubscription> -
The stream controller as returned when clients listen.
getter/setter pairinherited
- messageStream ↔ MqttByteBuffer
-
The read buffer
getter/setter pairinherited
- onBadCertificate ↔ bool Function(X509Certificate certificate)?
-
Callback function to handle bad certificate. if true, ignore the error.
getter/setter pair
- onDisconnected ↔ DisconnectCallback?
-
Unsolicited disconnection callback
getter/setter pairinherited
- readWrapper ↔ ReadWrapper?
-
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
-
closeClient(
) → void -
Closes the socket immediately.
override
-
connect(
String server, int port) → Future< MqttClientConnectionStatus?> -
Connect
override
-
connectAuto(
String server, int port) → Future< MqttClientConnectionStatus?> -
Connect Auto
override
-
disconnect(
{bool auto = false}) → void -
User requested or auto disconnect disconnection
inherited
-
disposeClient(
) → void -
Closes and dispose the socket immediately.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onData(
dynamic data) → void -
OnData listener callback
inherited
-
onDone(
) → void -
OnDone listener callback
inherited
-
onError(
dynamic error) → void -
OnError listener callback
inherited
-
onListen(
) → StreamSubscription -
Implement stream subscription
override
-
send(
MqttByteBuffer message) → void -
Sends the message in the stream to the broker.
override
-
stopListening(
) → void -
Stops listening the socket immediately.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited