disconnect method

Socket disconnect()

Implementation

Socket disconnect() {
  if (connected == true) {
    _logger.fine('performing disconnect ($nsp)');
    packet({'type': DISCONNECT});
  }

  // remove socket from pool
  destroy();

  if (connected == true) {
    // fire events
    onclose('io client disconnect');
  }
  return this;
}