Is there a way to measure how many bytes a particular socket sends/receives inside java? I’m writing server software for EC2 in java and I’m looking to minimize the bandwidth usage. I would like to be able to record statistics of what calls to the server cause the most bandwidth usage.
Is there a way to measure how many bytes a particular socket sends/receives inside
Share
The easiest thing would be to wrap your send/receive calls in a CountingOutputStream and CountingInputStream.