close method

void close(
  1. num code
)

Implementation

void close(num code) {
  this._clearHeartbeat();

  if (this._ws != null) {
    this._ws!.close(code.toInt(), CloseEventCodeInfo[code]?.name);
    this._ws = null;
  }
}