sky-l/php_socket_client

1.0 2015-11-13 13:40 UTC

This package is auto-updated.

Last update: 2024-03-09 14:04:50 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);