2017 © Pedro Peláez
 

library net-empty_port

find a free TCP/UDP port

image

dooaki/net-empty_port

find a free TCP/UDP port

  • Wednesday, October 2, 2013
  • by do-aki
  • Repository
  • 1 Watchers
  • 1 Stars
  • 26 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Net-EmptyPort

Build Status Coverage Status, (*1)

Net-EmptyPort is php library finding an empty TCP/UDP port., (*2)

Original is cpan module Net::EmptyPort, (*3)

Requirements

  • PHP 5.3 or later
  • Sockets Support enabled (--enable-sockets)

Installation

you can install the script with Composer., (*4)

in your composer.json file:, (*5)

{
    "require": {
        "dooaki/net-empty_port": "dev-master"
    }
}
composer.phar install

Methods

find([$port, $proto])

find free TCP port, (*6)

  use dooaki\Net\EmptyPort;

  $port = EmptyPort::find(5963); // 5963..65535

find free UDP port, (*7)

  $port = EmptyPort::find(null, 'udp'); // 1024..65535

isPortUsed($port, [$proto])

checks the given port is already used. also works for UDP, (*8)

  $dns_udp_used = EmptyPort::isPortUsed(53, 'udp');

wait($port, $max_wait_sec[, $protol])

wait for a particular port is available for connect., (*9)

Author

do_aki <do.hiroaki at gmail.com>, (*10)

License

MIT License, (*11)

The Versions

02/10 2013

dev-master

9999999-dev https://github.com/do-aki/Net-EmptyPort

find a free TCP/UDP port

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-sockets *

 

The Development Requires

net tcp socket udp

02/10 2013

0.0.2

0.0.2.0 https://github.com/do-aki/Net-EmptyPort

find a free TCP/UDP port

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-sockets *

 

The Development Requires

net tcp socket udp