friendsofhyperf/gateway-worker

The gateway-worker component for Hyperf.


Keywords
websocket, hyperf, gateway-worker
License
MIT

Documentation

Gateway Worker For Hyperf

Latest Test Latest Version on Packagist Total Downloads GitHub license

The gateway-worker component for Hyperf.

Installation

composer require friendsofhyperf/gateway-worker

publish

php bin/hyperf.php vendor:publish friendsofhyperf/gateway-worker

Usage

php bin/hyperf.php gateway-worker:serve [start|stop|restart|status|connections|help]

for help

php bin/hyperf.php gateway-worker:serve --help

Cluster

  • Cluster
Role IP Command
Register 192.168.1.101 php bin/hyperf.php gateway-worker:serve --register --register-bind=0.0.0.0:1215
Gateway 192.168.2.102-105 php bin/hyperf.php gateway-worker:serve --gateway --gateway-bind=0.0.0.0:1216 --register-address=192.168.1.101:1215 --lan-ip=192.168.1.xxx
Businessworker 192.168.1.106-110 php bin/hyperf.php gateway-worker:serve --businessworker --register-address=192.168.1.101:1215
  • In One
php bin/hyperf.php --register --gateway --businessworker