2

My iOS application uses SocketRocket to establish a connection with my websocket server. But after establishing a connection and sending the first message, the server (using gorilla/websocket) tries to parse the frame, but failed:

message_type, r, err := ws.NextReader()
if err != nil {
    goto end
}

An error is reported when calling NextReader():

Websocket Read Failed: [websocket: control frame length > 125]

The strange thing is, I use SocketRocket's send() method to send data, so there should never be any control frames (ping/pong).

Has anyone seen this problem before? Help!

NeoWang
  • 17,361
  • 24
  • 78
  • 126
  • If the bits 9 to 15 are interpreted as unsigned int are 125 or less thats your length, if not you need to add more bits to determine the data length. You are using SocketRocket, so I guess you are not doing anything with the Websocket frames, right? – David Gölzhäuser Jan 06 '17 at 23:28

0 Answers0