这个包的功能和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);