NetworkerServerMixin<T extends ConnectionInfo, O> mixin

The server abstraction of the networker library Please note that connection ids can only be between 2 and 2^16

Superclass constraints

Properties

address → Uri
no setterinherited
clientChange → Stream<Set<Channel>>
no setter
clientConnect → Stream<(Channel, ConnectionInfo)>
no setter
clientConnections → Set<Channel>
no setter
clientDisconnect → Stream<(Channel, ConnectionInfo)>
no setter
hashCode → int
The hash code for this object.
no setterinherited
isClosed → bool
no setterinherited
isOpen → bool
no setterinherited
onClosed → Stream<void>
no setterinherited
onOpen → Stream<void>
no setterinherited
read → Stream<NetworkerPacket<O>>
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
write → Stream<NetworkerPacket<Uint8List>>
no setterinherited

Methods

addClientConnection(T info, [Channel? id]) → Channel
clearConnections() → Future<void>
close() → Future<void>
override
closeConnection(Channel id) → Future<bool>
connect(NetworkerPipe<O, dynamic> pipe) → void
inherited
decode(Uint8List data) → FutureOr<O>
inherited
decodeChannel(Uint8List data, Channel channel) → FutureOr<(O, Channel)?>
inherited
disconnect(NetworkerPipe<O, dynamic> pipe) → void
inherited
dispose() → void
Disposes all stream controllers and disconnects all connected pipes.
inherited
encode(O data) → FutureOr<Uint8List>
inherited
encodeChannel(O data, Channel channel) → FutureOr<(Uint8List, Channel)?>
inherited
getConnectionInfo(Channel channel) → T?
init() → FutureOr<void>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onClientConnected(Channel id, T info) → void
Called when a new client connection is added. Override this to perform custom logic on connection.
onClientDisconnected(Channel id, T info) → void
Called when a client disconnects. Override this to perform custom logic on disconnection.
onMessage(Uint8List data, [Channel channel = kAnyChannel]) → Future<void>
inherited
removeConnection(Channel id) → Future<bool>
sendMessage(O data, [Channel channel = kAnyChannel]) → Future<void>
inherited
sendPacket(Uint8List data, Channel channel) → FutureOr<void>
override
toString() → String
A string representation of this object.
inherited

Operators

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