doudou890510 2011-02-02 21:50
浏览 234
已采纳

WebSocket消息前面的[]字符?

I'm playing around with websockets and I noticed that when my server sends a message to the client, there is an extra '[]' character in front of the message. This is preventing JS from parsing the json properly.

Any idea what this character is???

  • 写回答

4条回答 默认 最新

  • douyihuaimao733955 2011-02-02 22:17
    关注

    In addition to an HTTP-like handshake between client and server, each message from starts with '\x0' and ends with '\xff'.

    In future drafts of the WebSockets protocol (beyond 03/76), the framing delimiters have been replaced by framing which includes a leading length and no trailing special character.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器