We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$worker->onMessage = function(TcpConnection $connection, $data) { //$data是text还是binary }
js中的websocket接口可以根据data是string还是array buffer来判断,不过php中都是string。 有些场景下需要根据数据类型处理不同的业务逻辑,我看到Workerman\Protocols\Websocket里面是解析了opcode的,但似乎并没有暴露出来。
Workerman\Protocols\Websocket
The text was updated successfully, but these errors were encountered:
没有暴露
Sorry, something went wrong.
No branches or pull requests
js中的websocket接口可以根据data是string还是array buffer来判断,不过php中都是string。
有些场景下需要根据数据类型处理不同的业务逻辑,我看到
Workerman\Protocols\Websocket
里面是解析了opcode的,但似乎并没有暴露出来。The text was updated successfully, but these errors were encountered: