lib/websocket.js
function socketOnEnd() {
  const websocket = this[kWebSocket];

  websocket.readyState = WebSocket.CLOSING;
  websocket._receiver.end();
  this.end();
}
function socketOnEnd() {
  const websocket = this[kWebSocket];

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

@private
The listener of the net . Socket end event .