Boost logo

Boost Users :

Subject: [Boost-users] asio UDP message packet loss even on localhost?
From: Ákos Maróy (akos_at_[hidden])
Date: 2010-10-22 04:37:03


Hi,

I'm having a very basic issue: when sending a large number of UDP
messages in short succession via boost::asio, even to localhost, after a
few hundred messages, there seems to be a serious loss.

please see a sample code here: http://pastebin.com/Bq0DnkeG

the output I get is the following:

$ ./async_asio
0
1
2
3

...

939
940
941
942
943
944
958
983
1013
1049
1093
1151
1234
1363
1576
1943
b sent 2000 messages
a received 955 messages

so, basically while 2000 messages were sent over, only up to 944 were
received so that all of them are, an then there are only sporadic
messages received afterwards - a total of 955.

while I understand UDP is not guaranteed to be sent over, such a level
of unreliability to the localhost interface seems to be quite troublesome..

what am I doing wrong?

Akos


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net