LayrzProtocolSocket class

Constructors

LayrzProtocolSocket({required String ident, String password = '', required String server, LayrzProtocolVersion version = LayrzProtocolVersion.v2, BlackboxStoreCallback? onBlackboxStore, BlackboxFetchCallback? onBlackboxFetch})

Properties

hashCode int
The hash code for this object.
no setterinherited
ident String
final
onBlackboxFetch BlackboxFetchCallback?
Called on reconnect to retrieve and flush queued Blackbox packets.
final
onBlackboxStore BlackboxStoreCallback?
Called when a packet needs to be saved to the Blackbox (socket is down).
final
onEvent Stream<LayrzTcpEvent>
no setter
password String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
server String
final
splitRegExp RegExp
no setter
version LayrzProtocolVersion
final

Methods

composeEmptyPd() PdPacket
connect({Duration timeout = const Duration(seconds: 5)}) Future<bool>
disconnect() Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendData(ClientPacket message) Future<void>
sendImage({required List<int> bytes, required String filename, String contentType = 'image/jpeg'}) Future<void>
sendSos([PdPacket? message]) Future<void>
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

blackboxSending bool
getter/setter pair
isActive bool
getter/setter pair