destroy method

void destroy()

Implementation

void destroy() {
  if (transport != null) {
    transport!.destroy();
    transport = null;
  }
  for (var connection in connections) {
    connection.close();
  }
  stopStream();
  connections = [];
  connected = false;
  stream = null;
  joined = false;
}