Can you get the amount of UDP buffer space used?

D

drathnow

Is there any way to get the amount of buffer space used on a datagram
socket? I have an application that handles incoming UDP packets and it
slows down when the incoming traffic gets pretty busy. I would like to
figure out how many UDP packets are queued or at least how much of the
ReceiveBuffer space is being used.

Thanks,
Dave.

P.S. I'm working with Java 1.4.2 on Windoz.
 
G

Gordon Beaton

Is there any way to get the amount of buffer space used on a
datagram socket? I have an application that handles incoming UDP
packets and it slows down when the incoming traffic gets pretty
busy. I would like to figure out how many UDP packets are queued or
at least how much of the ReceiveBuffer space is being used.

AFAIK there is no way to do this from Java, however from a native
method you might use FIONREAD to see how much data is currently queued
for reading from the socket descriptor.

/gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top