frame not masked so close the connection报这种提示是异常吗?

dennlian

报这种提示是异常吗?
frame not masked so close the connection

6336 13 0
13个回答

walkor

根据https://tools.ietf.org/rfc/rfc6455.txt,客户端发往服务端的数据都必须加掩码,不加掩码需要关闭连接。
从错误提示看是因为客户端发来的数据没有做掩码处理。

  • 1171659744_php 2021-05-24

    大佬 请问一下 workerman可以关闭这个掩码处理吗

dennlian

我这边返回ping的是返回的就是一个ping,这个要做掩码处理吗,怎么处理,能给个例子吗??谢谢

  • 暂无评论
walkor

客户端是浏览器么?版本是?

  • 暂无评论
dennlian

客户端有APP也有浏览器,gateway 中的workerman用的是最新版的,如果客户端返回一个null会不会导致这个问题呢

  • 暂无评论
walkor

workerman具体版本报一下

  • 暂无评论
dennlian

3.5.13

  • 暂无评论
walkor

确认下是浏览器会不会出现这个问题

  • 暂无评论
dennlian

怎么确定,我把本地的改成ping值发送null,也没有报这个错

  • 暂无评论
walkor

如果浏览器没有问题,那可能是安卓websocket客户端有bug或者开发者没有设置mask,不要问我怎么设置,这个要看对应安卓客户端的文档。

  • 暂无评论
dennlian

好的,谢谢

  • 暂无评论
dennlian

这个关闭是不是只会关闭当前的一个连接

  • 暂无评论
walkor

对,只关闭当前这个有问题的连接

  • 暂无评论
nezx

I had the same problem.
there were such errors:

_frame not masked so close the connection_
or
_error opcode XX and close websocket connection_

it turned out to blame was mbstring
in particular, strlen (), which when enabled "mbstring " begins to measure not bytes but characters.
To solve this need in php.ini set
mbstring.func_overload = 0

  • walkor 2018-10-04

    That's helps so much. @4710 thank you a lot.

年代过于久远,无法发表回答
🔝