Get network usage

So, I was looking into solutions to check how much bandwidth my application is using. I did not find anything in spidermonkey, and I was wondering if anyone here has a neat trick for this game to check the amount of data it is sending/receiving?

Hm, bandwidth monitoring is probably best done at the OS level. I’m not aware of anything built into SpiderMonkey for that purpose.

Since my spidermonkey server is encapsulated into an app state, I check every message that is sent and basically convert it into a buffer and check its size. I accumulate that information and average it out in my profiling screen. I do that on both the client and server, but it is only enabled if the profiler is enabled so it doesn’t slow down normal execution. I also check the number of messages sent and received this way to help me narrow down network issues.