首页
下载
文档
社区
视频
捐赠
源代码
赞助商
AOT 编译器
AI 助理
商业产品
PHP AOT 原生编译器
Swoole-Compiler 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
websocket出现连接不上的错误
请问一下,我使用swoole作为server提供websocket的服务,客户端连接的时候会出现这样的错误: 2014-08-19 08:45:46 INFO connected client_id = 113 2014-08-19 08:45:46 INFO parseHeader fail. header= 2014-08-19 08:45:46 INFO http header is too long. 2014-08-19 08:45:46 CLOSE http header[GET / HTTP/1.1 Pragma: no-cache Cache-Control: no-cache Host: xx.xxx.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: p5gnF5PgIeI8O4uJsQInLw== Origin: xx.xxx.com Sec-WebSocket-Protocol: default-protocol Sec-WebSocket-Extensions: deflate-frame Sec-WebSocket-Version: 13 ] error. 2014-08-19 08:45:46 INFO close client_id = 113 重启 websocket server 后恢复正常。 代码中通过"\r\n\r\n"来进行explode,会不会createConnection($client_id, $data) 中的$data是"\r\r",从而导致了这些错误,希望能够得到解答,万分感谢!
发布于10年前 · 4 次浏览 · 来自
提问
黄
黄宏鑫-大比特资讯/大比特
请问一下,我使用swoole作为server提供websocket的服务,客户端连接的时候会出现这样的错误: 2014-08-19 08:45:46 INFO connected client_id = 113 2014-08-19 08:45:46 INFO parseHeader fail. header= 2014-08-19 08:45:46 INFO http header is too long. 2014-08-19 08:45:46 CLOSE http header[GET / HTTP/1.1 Pragma: no-cache Cache-Control: no-cache Host: xx.xxx.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: p5gnF5PgIeI8O4uJsQInLw== Origin: xx.xxx.com Sec-WebSocket-Protocol: default-protocol Sec-WebSocket-Extensions: deflate-frame Sec-WebSocket-Version: 13 ] error. 2014-08-19 08:45:46 INFO close client_id = 113 重启 websocket server 后恢复正常。 代码中通过"\r\n\r\n"来进行explode,会不会createConnection($client_id, $data) 中的$data是"\r\r",从而导致了这些错误,希望能够得到解答,万分感谢!
赞
0
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
登录
后参与评论
评论
2015-12-17
w
wjw8801
请更新一下swoole_framework
赞
0
回复