WebSocketChannelConnection class

TransportConnection over a WebSocketChannel.

Works on both ends of the wire: a client channel opened with WebSocketChannel.connect, and a server channel handed over by an HTTP framework that already performed the upgrade so nothing here waits on WebSocketChannel.ready — the caller does that when it opened the channel itself.

Implemented types

Constructors

WebSocketChannelConnection(WebSocketChannel _channel)
Constructor

Properties

hashCode → int
The hash code for this object.
no setterinherited
incoming → Stream<List<int>>
Stream of incoming data, one event per message sent by the peer.
no setteroverride
isConnected → bool
Whether the connection is active
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → Future<void>
Close the connection
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(List<int> data) → Future<void>
Send data as a single message.
override
toString() → String
A string representation of this object.
inherited

Operators

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