Boost logo

Boost Users :

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


Rutger,

> Not sure if it's related to your problem, but AFAICT you are not
> managing your resources in a correct way. Everything passed to an
> 'async_' function should outlive the full async operation. E.g., in your
> 'send' function you use a RValue string -- this will most probably not
> outlive the async_send_to operation.

thanks for the observation. as stated in an earlier e-mail, this code
comes from this sample:
http://www.boost.org/doc/libs/1_44_0/doc/html/boost_asio/example/echo/async_udp_echo_server.cpp

> Perhaps related to your problem, is that you are counting the number of
> "received_from" callbacks, not the number of received messages. Couldn't
> it be that you receive multiple messages in one callback?

my presumption would be that this is called each time a message is received.

also, when saving & printing out these messages, it is clear that
messages are received exactly as they are sent.

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