disconnect method

void disconnect()

Disconnect from the server and close any subscriptions

Implementation

void disconnect() {
  connectionState.stateType = HotlineSocketConnectionType.disconnected;
  socketChannel.sink.close();
}