I'm trying to understand the communication between slither.io client and web socket. While I'm reading WS packages the only thing that I can see is "Binary Frame (Opcode 2)". How can I do to read those messages?. Thanks.
Data Types and ExtensionsWebSockets support sending binary messages, too. To send binary data, one can use either Blob or ArrayBuffer object. Instead of calling the send method with string, you can simply pass an ArrayBuffer or a Blob .
WebSocket enables bidirectional, message-oriented streaming of text and binary data between client and server. It is the closest API to a raw network socket in the browser.
A WebSocket frame can be one of 6 types: text , binary , ping , pong , close and continuation . Furthermore, every frame is either a fin frame or not. The first byte of each frame is used to represent the type of frame (known as the op code) as well as whether or not it's a fin frame.
Slither.io uses binary frames to exchange data. As far as I know neither Chrome, nor Firefox allow you to read raw binary data. Try something like wireshark to sniff the traffic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With