简体   繁体   中英

Finding size of message sent in socket.io

I'm trying to optimise a serialise function for size, and wanted to compare the size of the message sent across the wire for two different schemes.

Is there a way of checking the size of the socket.io message to be sent for a given object?

Sorry if this is a trivial question/there's an obvious answer...

Thanks in advance!

You can use Chrome's developer tools. A guie is available here . This excludes the outer headers (ie, IP and TCP), if you need those as well, you have to use a separate tool like tcpdump or Wireshark.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM