You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.0 KiB
Markdown
37 lines
1.0 KiB
Markdown
GatewayClient
|
|
=================
|
|
`composer install`
|
|
|
|
`composer require workerman/gatewayclient`
|
|
|
|
```php
|
|
use GatewayClient\Gateway;
|
|
|
|
Gateway::$registerAddress = '127.0.0.1:3238';
|
|
|
|
Gateway::bindUid($client_id, $uid);
|
|
Gateway::joinGroup($client_id, $group_id);
|
|
|
|
Gateway::sendToUid($uid, $message);
|
|
Gateway::sendToGroup($group, $message);
|
|
|
|
Gateway::sendToAll($data);
|
|
Gateway::sendToClient($client_id, $data);
|
|
Gateway::closeClient($client_id);
|
|
Gateway::isOnline($client_id);
|
|
Gateway::bindUid($client_id, $uid);
|
|
Gateway::isUidOnline($uid);
|
|
Gateway::getClientIdByUid($uid);
|
|
Gateway::unbindUid($client_id, $uid);
|
|
Gateway::sendToUid($uid, $data);
|
|
Gateway::joinGroup($client_id, $group);
|
|
Gateway::sendToGroup($group, $data);
|
|
Gateway::leaveGroup($client_id, $group);
|
|
Gateway::getClientCountByGroup($group);
|
|
Gateway::getClientSessionsByGroup($group);
|
|
Gateway::getAllClientCount();
|
|
Gateway::getAllClientSessions();
|
|
Gateway::setSession($client_id, $session);
|
|
Gateway::updateSession($client_id, $session);
|
|
Gateway::getSession($client_id);
|
|
``` |