WebSocketServer class
WebSocket server implementation
- Inheritance
-
- Object
- CRDTSocketServer
- WebSocketServer
Constructors
-
WebSocketServer.new({required Future<
HttpServer> serverFactory(), required CRDTServerRegistry serverRegistry, Compressor? compressor, List<ServerSyncPlugin> ? plugins}) - Constructor
-
WebSocketServer.test({required Future<
HttpServer> serverFactory(), required CRDTServerRegistry serverRegistry, Compressor? compressor, WebSocketServerTransformer? serverTransformer, List<ServerSyncPlugin> ? plugins}) - Constructor for testing
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- host → String
-
The server host, if the server is not running, it will return
''
no setter -
plugins
→ List<
ServerSyncPlugin> -
The server plugins
finalinherited
- port → int
-
The server port, if the server is not running, it will return
0
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
serverEvents
→ Stream<
ServerEvent> -
Server event stream
no setteroverride
Methods
-
broadcastMessage(
Message message, {List< String> ? excludeClientIds}) → Future<void> -
Broadcast a message to all subscribed clients
override
-
dispose(
) → void -
Dispose the server
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendMessageToClient(
String clientId, Message message) → Future< void> -
Send a message to a specific client
override
-
start(
) → Future< bool> -
Start the server
override
-
stop(
) → Future< void> -
Stop the server
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited