Bytes sent/received

I decided to use built-in networking for my current project and so far I am finding it quite simple and easy to use, until I have come to a “problem”.



I was looking through the networking code (com.jme3.network and sub-packages) trying to figure out where I could extract information of bytes sent/received per message (or total) for both client and server, but was unable to locate that info. Is it currently possible to gather that information?



Thank you.

I was looking into the needed modifications for this to happen on my application. And saw that I would have to change DefaultServer’s internal Connection, although the code is easy to read in the current structure, with many fields marked as “private” and cross-references between many classes in “com.jme3.network.base” I would need to either copy and paste all the code from classes in this package into a new class structure, or would have to make my own custom build of jMonkey with the tracking code in-place and I would rather not make either of them.

Since I am using the framework completely vanilla, I would not like to maintain my own network stack, backporting changes from the standard network into my customized build so I could have the tracking of this data.



So, would it be possible to have the private fields in DefaultServer and DefaultClient and inner classes made protected? This way, I could easily extend them with any new functionality as needed, without having to duplicate and maintain a full copy of the network stack.



Thanks.