BoltServer class abstract

A server that listens for incoming Connections.

Inheritance

Constructors

BoltServer({required List<BoltBinding> bindings, Logger? logger, int maxConnections = 64})
A server that listens for incoming Connections.

Properties

acknowledgedPackets ↔ Stream<Acknowledged<DataObject>>
Stream of packets that were acknowledged by the other end.
latefinalinherited
connected ↔ Stream<Connection>
Stream of connections that have connected to the server.
latefinal
connections → List<Connection>
The connected connections.
no setter
disconnected ↔ Stream<Connection>
Stream of connections that have disconnected from the server.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
logger → Logger
The logger to use.
finalinherited
maxConnections → int
The maximum amount of connections that the server allows.
final
packets ↔ Stream<Packet<DataObject>>
Stream of packets received from the other end.
latefinalinherited
protocolVersion → int
The version of the protocol, this is used to determine if the client and server are compatible.
finalinherited
registry → BoltRegistry
The registry that holds all the data objects serializers and payload types.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind() → Future<void>
Bind all the bindings.
inherited
broadcast<T extends DataObject, V extends DataResolver<T>>(T data, {Connection? exclude}) → void
Broadcasts data to all connections.
disconnect() → Future<void>
Disconnect and unbind all the bindings.
inherited
disconnectConnection(Connection connection) → void
Disconnects a connection.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
off<T extends DataObject>(MessageHandler<Message<T>> handler) → void
Removes a handler for when a Message of type T is received from a connection.
offAck<T extends DataObject>(MessageHandler<AcknowledgedMessage<T>> handler) → void
Removes a handler for when an AcknowledgedMessage of type T is received from a connection.
on<T extends DataObject>(MessageHandler<Message<T>> handler) → void
Registers a handler for when a Message of type T is received from a connection.
onAck<T extends DataObject>(MessageHandler<AcknowledgedMessage<T>> handler) → void
Registers a handler for when an AcknowledgedMessage of type T is received from a connection.
onConnected(Connection connection) → void
Called when a connection is connected to the server.
onDisconnected(Connection connection) → void
Called when a connection is disconnected from the server.
rawSend<T extends DataObject, V extends DataResolver<T>>(T object, Address address, [int salt = 0]) → void
Send a DataObject packet to the address.
inherited
retrieveSalt(Address address) → int
The salt to use for a packet sent to address.
override
send<T extends DataObject, V extends DataResolver<T>>(T data, Connection connection) → void
Sends data to a connection.
start() → Future<void>
Starts listening for incoming connections.
toString() → String
A string representation of this object.
inherited
verifyAuth(Connection connection, String token) → Future<bool>
Called when a connection request is received, to validate the authentication token.

Operators

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