2017 © Pedro Peláez
 

library dht-search

A collection of tools for searching DHT via PHP.

image

pxgamer/dht-search

A collection of tools for searching DHT via PHP.

  • Monday, December 18, 2017
  • by PXgamer
  • Repository
  • 1 Watchers
  • 3 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

dht-search

Latest Version on Packagist ![Software License][ico-license] Build Status Style CI ![Code Coverage][ico-code-quality] Total Downloads, (*1)

A collection of tools for searching DHT via PHP., (*2)

Structure

src/
tests/
vendor/

Install

Via Composer, (*3)

``` bash $ composer require pxgamer/dht, (*4)


## Usage ``` php $serv = null; $this->node_id = Base::get_node_id(); $table = array(); $last_find = time(); $threads = []; Logger::write(date('Y-m-d H:i:s', time()) . " - Starting service...\n"); $serv = new swoole_server('0.0.0.0', 6882, SWOOLE_PROCESS, SWOOLE_SOCK_UDP); $serv->set(array( 'worker_num' => WORKER_NUM, 'daemonize' => false, 'max_request' => MAX_REQUEST, 'dispatch_mode' => 2, 'log_file' => ABSPATH . '/error.log' )); $serv->on('WorkerStart', function ($serv, $worker_id) { swoole_timer_tick(AUTO_FIND_TIME, 'timer'); auto_find_node(); }); $serv->on('Receive', function ($serv, $fd, $from_id, $data) { if (strlen($data) == 0) { return false; } $msg = Base::decode($data); if (empty($msg['y'])) { return false; } $fdinfo = $serv->connection_info($fd, $from_id); if (empty($fdinfo['remote_ip'])) { return false; } if ($msg['y'] == 'r') { if (array_key_exists('nodes', $msg['r'])) { Response::action($msg, array($fdinfo['remote_ip'], $fdinfo['remote_port'])); } } elseif ($msg['y'] == 'q') { Request::action($msg, array($fdinfo['remote_ip'], $fdinfo['remote_port'])); } else { return false; } }); $serv->start();

Change log

Please see CHANGELOG for more information on what has changed recently., (*5)

Testing

bash $ composer test, (*6)

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details., (*7)

Security

If you discover any security related issues, please email owzie123@gmail.com instead of using the issue tracker., (*8)

Credits

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

18/12 2017

dev-develop

dev-develop

A collection of tools for searching DHT via PHP.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

06/12 2017

dev-master

9999999-dev

A collection of tools for searching DHT via PHP.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

06/12 2017

v1.0.0

1.0.0.0

A collection of tools for searching DHT via PHP.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

20/11 2017

dev-analysis-8wa9V9

dev-analysis-8wa9V9

A collection of tools for searching DHT via PHP.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires