sky-l / php_socket_client
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/sky-l/php_socket_client
Requires
- php: >5.3.0
This package is auto-updated.
Last update: 2025-10-09 17:34:37 UTC
README
这个包的功能和workerman 的功能没有任何修改,只是做成了一个包。方便使用composer的项目使用
使用
引入文件
require "vendor/autoload.php";
use skylee\gateway;
Gateway::$registerAddress = '127.0.0.1:1236';
例子
Gateway::sendToAll('{"type":"broadcast","content":"hello all"}');
Gateway::sendToClient($client_id,'{"type":"say","content":"hello"}');
Gateway::isOnline($client_id);