Download the PHP package linksoft/socket-client without Composer
On this page you can find all versions of the php package linksoft/socket-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package socket-client
该拓展用于 websocket 同步收发包
注意事项:
- 项目必须处于 hyperf 协程风格模式下,不能是进程模式。
- 当前收发包并没有设置超时时间,可能由于 tcp 连接不健康导致收发包响应缓慢,后续考虑增加收发包超时控制。
使用方法
-
发布配置文件
-
在连接被建立时做一些初始化操作,包内定义了 LinkSocketInitSuccessEvent 事件,在连接被建立时会触发,调用者只需定义一个 listener,监听该事件,并做操作即可,连接异常断开重连也会触发该事件。
-
使用本包主动向服务端发起请求
-
自定义 packer
-
使用你自定义的 packer
-
自定义 callback,对服务端主动推送的数据做处理,同时,客户端主动请求但处理失败的数据,最终也会到这里,使用者请注意。
- 自定义 ResponseProcessor,可以将服务端对某个消息的多次推送做拼接。
All versions of socket-client with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.3
ext-sockets Version *
hyperf/di Version 2.2.*
hyperf/framework Version 2.2.*
hyperf/http-server Version 2.2.*
hyperf/logger Version ^2.2
ext-json Version *
ext-sockets Version *
hyperf/di Version 2.2.*
hyperf/framework Version 2.2.*
hyperf/http-server Version 2.2.*
hyperf/logger Version ^2.2
ext-json Version *
The package linksoft/socket-client contains the following files
Loading the files please wait ....