lib/socket.js
function SocketProxy() {
  // the socket we are paired with
  this.pair = null;

  // internal sockets have fd -1
  this._handle = {fd: -1};

  // mimic a remote address / remote port
  this.remoteAddress = '0.0.0.0';
  this.remotePort = '0';

  // give the client some time to listen
  // for the connect event
  function onNextTick() {
    this.emit('connect');
  }
  process.nextTick(onNextTick.bind(this));
}
function SocketProxy() {
  // the socket we are paired with
  this.pair = null;

  // internal sockets have fd -1
  this._handle = {fd: -1};

  // mimic a remote address / remote port
  this.remoteAddress = '0.0.0.0';
  this.remotePort = '0';

  // give the client some time to listen
  // for the connect event
  function onNextTick() {
    this.emit('connect');
  }
  process.nextTick(onNextTick.bind(this));
}
function SocketProxy ( ) { // the socket we are paired with this . pair = null ; // internal sockets have fd -1 this . _handle = { fd : - 1 } ; // mimic a remote address / remote port this . remoteAddress = '0.0.0.0' ; this . remotePort = '0' ; // give the client some time to listen // for the connect event function onNextTick ( ) { this . emit ( 'connect' ) ; } process . nextTick ( onNextTick . bind ( this ) ) ; }
Abstract socket class used to create a bi-directional link between
a server and a client connecting in the same process.

Simulates the `net.Socket` class so that the code flows in exactly
the same way but bypasses encoding, decoding and TCP transmission
overhead.
Abstract socket class used to create a bi - directional link between a server and a client connecting in the same process .