sink property
latefinal
Messages added to this sink will be sent to the other side of the connection.
Implementation
@override
late final StreamSink<ApiMessage> sink =
StreamSinkTransformer<ApiMessage, WebSocketData>.fromHandlers(
handleData: (message, sink) {
_log.finest('sending: $message');
sink.add(WebSocketData.binary(value: message.toProto().writeToBuffer()));
},
).bind(_websocket.sink);