Property | Type | Description | |
---|---|---|---|
$EOF | string | 数字 3338 使用 msgpack 编码后会产生一个 \r\n, 所以切不可只用 \r\n 做分隔符 | |
$defaultRPC | string | RPC 对象名 | |
$forbiddenAction | array | 不允许调用的方法, 全小写, 下划线(_)开头的的方法已经默认不允许了 |
Property | Type | Description | |
---|---|---|---|
$setting | array | 默认监听设置 |
Method | Description | |
---|---|---|
decryption ( $data, $key = null, $rpc = null ) : false | mixed | 解密数据 | |
encrypt ( mixed $data, $key = null, $rpc = null ) : string | 加密数据 | |
listen ( $ip, $port ) | 监听一个端口 | |
onPipeMessage ( Swoole\Server $server, integer $fromWorkerId, mixed $message, $serverId ) : mixed | 接受到任意进程的调用 | |
onReceive ( Swoole\Server $server, $fd, $fromId, $data ) | 收到信息 |
Method | Description | |
---|---|---|
call ( $fd, $fromId, stdClass $data ) | ||
rc4 ( string $string, string $isDecode = true, string $key = null, number $expiry ) : string | 优化版rc4加密解密 |
public static decryption ( $data, $key = null, $rpc = null ) : false | mixed | ||
$data | ||
return | false | mixed |
public onReceive ( Swoole\Server $server, $fd, $fromId, $data ) | ||
$server | Swoole\Server | |
$fd | ||
$fromId | ||
$data |
public static string $EOF | ||
return | string |
public static array $forbiddenAction | ||
return | array |