- Home /
Observing network traffic, bytes received, bytes sent
Hi all,
I was wondering if it is possible to observe the network traffic generated by Unity via script? I'm not worried about the usage of the average Joe, but in order to protect against people that generate too many requests (and thus too much network data), I need to monitor the bytes received/sent for each connection. Just counting the RPC's is insufficient unfortunately.
Any help is appreciated. Thanks
Answer by sparkzbarca · Dec 27, 2013 at 02:25 PM
IM not at all an expert but id be fairly certain you'd use a 3rd party software program listening in on the port there connecting to you from and then if you have multiple connections from many users in that port monitoring it by IP.
I think if you want to bash someone from flooding your server with requests your going to want to use network software not unity at all.
hm, thanks. Using external programs is always an option, but I was kinda hoping for a Unity implementation =/ After all, this is captured in Unity itself within the built-in player... it would seem just prudent to offer the option via script.
my response if I was unity would be.
A. any code we write must be maintained through versions and must be written. Writing and maintaining this code takes away from time that could be spent on core functionality.
B. any script we hacked up wouldnt be as user friendly or allow as much fine control or function as well as a dedicated 3rd party application
C. there are numberous free 3rd party applications which perform this service and do so to a much better level.
im not saying it wouldnt be nice to have, but of course everything is a trade off, I just think they wouldnt find it worth paying an programmer 60 bucks an hour to code up for there game engine program. Just my opinion of course.
Answer by Bertlapp · May 11, 2018 at 09:11 PM
Unity 2017 and earlier (?) has a profiler under window-> profiler Here you can see your network activity if you scroll down to Network messages / Network operations
I'm not sure you can monitor the actual bytes send. But it gives a good estimation of how many load you put on your network.
Regards