subscribe abstract method

void Function() subscribe(
  1. Request payload,
  2. EventSink<Response> sink
)

Subscribes through the WebSocket following the config parameters. It uses the sink to emit received data or errors. Returns a cleanup function used for dropping the subscription and cleaning stuff up.

Implementation

void Function() subscribe(
  Request payload,
  EventSink<Response> sink,
);