send method

void send(
  1. String channel,
  2. String data
)

It is used to send the data to server.

Implementation

void send(String channel, String data) async {
  if (_isAuthenticated) {
    Future<String> fData = _prepare_data(data, channel);
    fData.then((value) {
      _sender(value, _naniDict[_socket]);
    });
  } else {
    _funcStkBefAuth.add([
      send,
      [channel, data]
    ]);
  }
}