Boost logo

Boost Users :

Subject: Re: [Boost-users] Looking for guidance on how best to use Boost ASIO in this scenario
From: Igor R (boost.lists_at_[hidden])
Date: 2009-03-24 16:07:13


> I see. The clients aren't going to be sending much of anything. They are
> mostly going to just be receiving data. Is there a particular sample that
> shows client/server with async_data read?

There're lots of examples that involve async. read/write:
http://www.boost.org/doc/libs/1_38_0/doc/html/boost_asio/examples.html
The most simple is async.chat client:
http://www.boost.org/doc/libs/1_38_0/doc/html/boost_asio/example/chat/chat_client.cpp

> Does this mean the client will be polling or will be notified when there is data to read?

The handler that you pass to async_read is called by asio when the
read operation is complete.


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