huobiapi / Futures-Go-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Websocket 使用类型错误

jjz opened this issue · comments

commented

Websocket有自己的消息类型,ping 和 pong ,而ping的消息是方在text里面的。

*  %x0 denotes a continuation frame

      *  %x1 denotes a text frame

      *  %x2 denotes a binary frame

      *  %x3-7 are reserved for further non-control frames

      *  %x8 denotes a connection close

      *  %x9 denotes a ping

      *  %xA denotes a pong

https://tools.ietf.org/html/rfc6455
而pong的消息也需要放在text里面