Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does 'opcode -1' mean in Chrome?

I'm using Chrome browser and I'm trying to create a WebSocket connection (using javascript) but sometimes I get an error. When I'm looking in Developer Tools for the WS connection, I see OPCODE -1. What does this mean?

like image 989
caisah Avatar asked Mar 21 '26 12:03

caisah


1 Answers

WebSocket OPCODEs describe how to interpret the frame. The OPCODES are formally between 0-10, OPCODE -1 says "not frame that can be used":

https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#Exchanging_Data_Frames

https://tools.ietf.org/id/draft-ietf-hybi-thewebsocketprotocol-09.html#rfc.section.11.14

like image 91
Randy Casburn Avatar answered Mar 24 '26 01:03

Randy Casburn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!