sky-l/php_socket_client

1.0 2015-11-13 13:40 UTC

This package is auto-updated.

Last update: 2024-09-09 15:00:48 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);