B2G/gecko/dom/network/tests/unit/test_tcpsocket.js
/**
 * Spin up a listening socket and associate at most one live, accepted socket
 * with ourselves.
 */
Spin up a listening socket and associate at most one live, accepted socket
with ourselves.
Spin up a listening socket and associate at most one live accepted socket with ourselves .
function TestServer() {
  this.listener = ServerSocket(-1, true, -1);
  do_print('server: listening on', this.listener.port);
  this.listener.asyncListen(this);
  this.binaryInput = null;
  this.input = null;
  this.binaryOutput = null;
  this.output = null;
  this.onaccept = null;
  this.ondata = null;
  this.onclose = null;
}
function TestServer ( ) { this . listener = ServerSocket ( - 1 , true , - 1 ) ; do_print ( 'server: listening on' , this . listener . port ) ; this . listener . asyncListen ( this ) ; this . binaryInput = null ; this . input = null ; this . binaryOutput = null ; this . output = null ; this . onaccept = null ; this . ondata = null ; this . onclose = null ; }
Spin up a listening socket and associate at most one live, accepted socket
 with ourselves.
Spin up a listening socket and associate at most one live accepted socket with ourselves .