WebSocketClient

External Documentation

Wrapper for a WebSocket client connection

Constructors

WebSocketClient(JSWebSocket _ws)

Properties

hashCode int
The hash code for this object.
no setterinherited

isOpen bool

no setter

runtimeType Type

A representation of the runtime type of the object.
no setterinherited

userId String?

getter/setter pair

Methods

close([int code = 1000, String reason = '']) → void

noSuchMethod(Invocation invocation) → dynamic

Invoked when a nonexistent method or property is accessed.
inherited

onClose(CloseHandler handler) → void

Registers a handler for connection close events

onError(ErrorHandler handler) → void

Registers a handler for error events

onMessage(MessageHandler handler) → void

Registers a handler for incoming messages

send(String message) → void

sendJson(Map<String, Object?> data) → void

toString() String

A string representation of this object.
inherited

Operators

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