code: function Server_stop() {
    if (!this._wsStarted) throw Error("server not started")
    if (this._wsStopped) return
  
    this._wsStopped = true
  
    sessions.shutDown()
    this._wsServer.shutDown()
  
    this._wsServer.removeListener("request", this._onRequest)
    this._wsServer.removeListener("connect", onConnect)
  
    self._wsConfig  = null
    self._wsServer  = null
  }
docs: ------------------------------------------------------------------------------