sendAction method

void sendAction(
  1. WebSocketAction action
)

Sends the given action on the socket, or once it is connected.

Implementation

void sendAction(WebSocketAction action) {
  var socket = _socket;
  if (socket == null) {
    _queue.addLast(action);
  } else {
    socket.sink.add(serialize(action));
  }
}