leave method

Future leave(
  1. String topicName,
  2. bool unsubscribe
)

Detach and optionally unsubscribe from the topic

Implementation

Future leave(String topicName, bool unsubscribe) {
  var packet = _packetGenerator.generate(packet_types.Leave, topicName);
  var data = packet.data as LeavePacketData;
  data.unsub = unsubscribe;
  packet.data = data;
  return _send(packet);
}