code: function waitUntilUsedOnHost(port, host, retryTimeMs, timeOutMs) {
  
      // the first arument may be an object, if it is not, make an object
      var opts;
      if (is.obj(port)) {
          opts = port;
          opts.inUse = true;
      } else {
          opts = makeOptionsObj(port, host, true, retryTimeMs, timeOutMs);
      }
  
      return waitForStatus(opts);
  }
docs: Creates a deferred promise and fulfills it only when the socket is used.
  Will retry on an interval specified in retryTimeMs.
  Note: you have to be super user to correctly test system ports (0-1023).
  @param {Number|Object} port a valid TCP port number. If an object, must contain all the parameters as properties.
  @param {Number} [retryTimeMs] the retry interval in milliseconds - defaultis is 500ms
  @param {Number} [timeOutMs] the amount of time to wait until port is free
  @return {Object} A deferred promise from the q library.
  
  Example usage:
  
  var tcpPortUsed = require('tcp-port-used');
  tcpPortUsed.waitUntilUsedOnHost(44204, 'some.host.com', 500, 4000)
  .then(function() {
  console.log('Port 44204 is now in use.');
  }, function(err) {
  console.log('Error: ', error.message);
  });