stream property

  1. @override
Stream<ApiMessage> stream
latefinal

Messages from the other side of the connection will appear in this stream.

Implementation

@override
late final Stream<ApiMessage> stream = _websocket.stream
    .whereType<WebSocketDataBinary>()
    .map((event) => event.value)
    .map(shrapnel_pb.Message.fromBuffer)
    .map(ApiMessageProtoEx.fromProto)
    .logFinest(
      _log,
      (event) => 'received: $event',
    );