code: function socketOnEnd() {
    const websocket = this[kWebSocket];
  
    websocket.readyState = WebSocket.CLOSING;
    websocket._receiver.end();
    this.end();
  }
docs: The listener of the `net.Socket` `'end'` event.
  
  @private