|
Boost Users : |
Subject: Re: [Boost-users] [ASIO]what's the meaning of CompletionCondition in boost::asio::async_read?
From: Igor R (boost.lists_at_[hidden])
Date: 2009-11-06 08:49:31
> take follow code as example:
> boost::asio::async_read(socket_,boost::asio::buffer(...),boost::asio::transfer_at_least(1),boost::bind(...));
> Before I think it'll return if read 1 bit, but at fact it return until receive EOF or buffer is full.
Your handler will be called only after *at least* 1 byte is read. It
doesn't mean that when the handler is called, you get *exactly* 1 byte
in the buffer, but *at least* 1 byte.
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