最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Unrecognized frame opcode: 5 and web socket closes - Stack Overflow

programmeradmin1浏览0评论

I get this error very often in my web socket application and web socket immediately closes. The only error message I see is "Unrecognized frame opcode: 5 " in my browser console. Can anyone give me an idea why and in which case this error occurs.

Thanks!

I get this error very often in my web socket application and web socket immediately closes. The only error message I see is "Unrecognized frame opcode: 5 " in my browser console. Can anyone give me an idea why and in which case this error occurs.

Thanks!

Share Improve this question edited Sep 25, 2012 at 12:58 pmfl asked Sep 25, 2012 at 12:51 pmflpmfl 2,1095 gold badges31 silver badges48 bronze badges 2
  • This is not a jQuery-specific question. – user659025 Commented Sep 25, 2012 at 12:57
  • Can you post client code that demonstrates this please? Also, which server are you using? If its not a standard server, can you also post source for it? – simonc Commented Sep 25, 2012 at 13:00
Add a ment  | 

1 Answer 1

Reset to default 2

The final draft of the WebSocket RFC 6455 defines opcodes 0, 1, 8, 9 and 10. Old versions (e.g. version 6) have defined opcode 5 to be a binary frame. This is now obsoleted, that opcode no longer exists.

Your server is outdated and only supports old versions of the WebSocket protocol. Many WebSocket servers support multiple versions and are able to switch between them. You should use a server that does that.

发布评论

评论列表(0)

  1. 暂无评论