disconnect method

Socket disconnect([
  1. dynamic close
])

Disconnects this client.

@param {Boolean} if true, closes the underlying connection @return {Socket} self @api public

Implementation

Socket disconnect([close]) {
  if (!connected) return this;
  if (close == true) {
    client.disconnect();
  } else {
    packet(<dynamic, dynamic>{'type': disconnectValue});
    onClose('server namespace disconnect');
  }
  return this;
}