Reg: DatagramSocket
Dear friends,
I have one problem regarding the 'DatagramSocket'.. I have created one DatagramSocket and bound to some port.. It is receiving packets inside an infinite while loop... I have sent 1000 packets in one second but it's receiving only 200-250 packets... Why it happened? Please tell me what may be the problem?
> Dear friends,
> I have one problem regarding
> the 'DatagramSocket'.. I have created one
> DatagramSocket and bound to some port.. It is
> receiving packets inside an infinite while loop... I
> have sent 1000 packets in one second but it's
> receiving only 200-250 packets... Why it happened?
>Please tell me what may be the problem?
The problem is that it's UDP. And with UDP **** happens.
This shouldn't be important. If it is important then you shouldn't be using UDP. You should be using TCP.
> ok. What is the maximum socketBufferSize that we can
> set for a DatagramSocket ?
It depends.
Would you like the other side to actually receive any of these packets?