WsServerEndpoint class

A Hub-side TLS WebSocket listener.

Binds an HTTPS server with the provided SecurityContext and upgrades incoming WebSocket requests, handing each accepted WebSocketConnection to the supplied OnConnection callback. There is no plaintext mode: a SecurityContext is mandatory.

Properties

address InternetAddress
The address the server is bound to.
no setter
hashCode int
The hash code for this object.
no setterinherited
port int
The port the server is listening on.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close({bool force = false}) Future<void>
Stops the server. With force, open connections are dropped immediately.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

bind({required Object host, required int port, required SecurityContext securityContext, required OnConnection onConnection, FrameCodec codecFactory()?}) Future<WsServerEndpoint>
Binds and starts a TLS WebSocket endpoint on host:port.