The Programmer G The Programmer G - 3 months ago 15
Node.js Question

How to see the data being sent by Socket IO?

I am developing a game using SocketIO and NodeJS. However, the game currently sends too much data and I would like to figure out why by checking the data being sent every frame. How can I do this?

Answer

Open up Chrome's inspect element. Go to the network tab. Enter into the filter tab websocket and you should see a websocket item in the list. When you click on that you can then see "frames". That'll show you the data that socket.io is sending across websockets.