ekstazi/ websocket-stream-client
基于不同实现提供的异步WebSocket流客户端接口,适用于基于Amp。
2.0
2020-04-09 09:50 UTC
Requires
- php: >=7.2
- amphp/amp: ^2.2
- amphp/byte-stream: ^1
- ekstazi/websocket-common: ^2.0
- psr/http-message: ^1
Requires (Dev)
- amphp/php-cs-fixer-config: dev-master
Suggests
- ekstazi/websocket-stream-client-amphp: For amphp websocket-client stream implementation
- ekstazi/websocket-stream-client-implementation: For websocket client implementation
This package is auto-updated.
Last update: 2024-09-09 19:49:24 UTC
README
WebSocket流客户端是一组接口,为不同的WebSocket客户端提供类似amphp流的接口。
接口
提供两个接口
interface ConnectionFactory
方法
connect(RequestInterface $request, string $mode = self::MODE_BINARY): Promise
返回一个承诺,其中包含通过请求连接到WebSocket的流。模式是用于发送WebSocket帧的模式。
interface Connection extends ekstazi\websocket\common\Connection
更多详细信息请见 ekstazi/websocket-common