code: function normalizeConnectArgs(args)
  {
  	if( typeof args[0]==='object' && args[0]!==null )
  		return args[0]
  	else if( typeof args[0]==='string' && !(Number(args[0]) >= 0) )
  		return {path: args[0]}
  	var options= {port: args[0]}
  	if( typeof args[1]==='string' )
  		options.host= args[1]
  	return options
  }
docs: from joyent/node/lib/net.js