StompServer class

STOMP server for handling client connections over libp2p

Constructors

StompServer.new({required Host host, String? serverName, Duration timeout = StompConstants.defaultTimeout})

Properties

connections List<StompServerConnection>
Gets all active connections
no setter
hashCode int
The hash code for this object.
no setterinherited
isRunning bool
Whether the server is running
no setter
onConnection Stream<StompServerConnection>
Stream of new connections
no setter
onDisconnection Stream<StompServerConnection>
Stream of disconnections
no setter
onMessage Stream<StompMessage>
Stream of messages sent to destinations
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

broadcast({required String body, String? contentType, Map<String, String>? headers}) Future<void>
Broadcasts a message to all connected clients
getConnection(String sessionId) StompServerConnection?
Gets a connection by session ID
getConnectionByPeer(PeerId peerId) StompServerConnection?
Gets a connection by peer ID
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendToDestination({required String destination, String? body, Uint8List? bodyBytes, String? contentType, Map<String, String>? headers}) Future<void>
Sends a message to a destination
start() Future<void>
Starts the STOMP server
stop() Future<void>
Stops the STOMP server
toString() String
A string representation of this object.
inherited

Operators

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