# Module selenium-webdriver/net/portprober

code »
Show:Public Protected Private

## Functions

code »findFreePort ( opt_host ) ⇒ `!webdriver.promise.Promise.<number>`

Parameters

opt_host: `string=`
  The bound host to test the `port` against. Defaults to `INADDR_ANY`.

Returns

A promise that will resolve to a free port. If a port cannot be found, the promise will be rejected.

code »isFree ( port, opt_host ) ⇒ `!webdriver.promise.Promise.<boolean>`

Tests if a port is free.

Parameters

port: `number`
  The port to test.
opt_host: `string=`
  The bound host to test the `port` against. Defaults to `INADDR_ANY`.

Returns

A promise that will resolve with whether the port is free.