lib/server.js
function createConnection() {

  // create the internal socket object
  var server = new Socket()
    , client = new Socket();

  // pair the sockets
  client.pair = server;
  server.pair = client;

  // register the server side so it is wrapped
  // in a connection and stored as an active connection
  this.connection(server);

  // return the client side of the socket
  return client;
}
function createConnection() {

  // create the internal socket object
  var server = new Socket()
    , client = new Socket();

  // pair the sockets
  client.pair = server;
  server.pair = client;

  // register the server side so it is wrapped
  // in a connection and stored as an active connection
  this.connection(server);

  // return the client side of the socket
  return client;
}
function createConnection ( ) { // create the internal socket object var server = new Socket ( ) , client = new Socket ( ) ; // pair the sockets client . pair = server ; server . pair = client ; // register the server side so it is wrapped // in a connection and stored as an active connection this . connection ( server ) ; // return the client side of the socket return client ; }
Creates a socket object to be used by a client
within this process.
Creates a socket object to be used by a client within this process .