WsAdapter class
The WsAdapter class is used to create a new web socket adapter
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen → bool
-
The isOpen property contains the status of the adapter.
no setteroverride
- logger ↔ Logger
-
The logger property contains the logger
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
server
↔ Map<
String, WebSocket> ? -
The server property contains the server.
getter/setter pairinherited
- shouldBeInitilized → bool
-
If true the application will also initialize the adapter.
no setteroverride
Methods
-
addContext(
String key, WebSocketContext context) → void - The addContext method is used to add a context to the adapter
-
canHandle(
InternalRequest request) → bool -
The canHandle method is used to determine if the adapter can handle the request.
override
-
close(
) → Future< void> -
The close method is used to close the server.
override
-
getHandler(
ModulesContainer container, ApplicationConfig config, Router router) → Handler -
The getHandler method is used to get the handler for the adapter.
override
-
init(
ModulesContainer container, ApplicationConfig config) → Future< void> -
The init method is used to initialize the server.
override
-
listen(
covariant List< WsRequestHandler> requestCallback, {InternalRequest? request, List<DisconnectHandler> ? onDone, ErrorHandler? errorHandler}) → Future<void> -
The listen method is used to listen for requests.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
dynamic data, {String? key}) → void -
The send method is used to send data to the client
It takes
data
andkey
and returnsvoid
-
toString(
) → String -
A string representation of this object.
inherited
-
upgrade(
InternalRequest request) → Future< void> - The upgrade method is used to upgrade the request to a web socket request
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited