Boost logo

Boost :

From: BRIDGES Dick (Dick.Bridges_at_[hidden])
Date: 2005-11-11 13:36:38


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of
> Christopher Kohlhoff
> Sent: Thursday, November 10, 2005 7:18 PM
> To: boost_at_[hidden]
> Subject: [boost] [asio] Are the _at_least_n functions useful?
>
>
> Hello all,
>
> As part of cleaning up asio's interface I am pondering the utility of
> the read_at_least_n/write_at_least_n free functions. I'd appreciate
> hearing from anyone who actually uses these functions (or their async
> counterparts), and anyone else who has an opinion on the matter :)
 
[snip]

> Cheers,
> Chris

<use_case truncated="yes">
I have done some message passing over TCP where the message headers can
be fairly elaborate and there is considerable variation in message size
(e.g., DIAMETER RFC 3588). Every time some traffic arrives, one of two
questions get asked: "Did we get enough of the header to determine the
message length?" or "Given we know the length, do we have the entire
message yet?". It would be nice to move this code (and all of the
associated anomaly handling) out of the application and *down* into the
library. read_at_least_n would certainly be handy.
</use_case>

As a generalization, I'd say that those two questions get asked almost
anytime discrete messages are passed over a stream protocol.

<aside humorous="hopefully" sentiment="serious">
I am already using asio on [at least] two projects so I have no stake in
hurrying the review process. License is Boost. Great support is
available on boost_at_lists.boost.org. Packaging won't change
substantially until 1.34. "Accepted" should be a *very* good bet. Take
your time. ;)
</aside>

Regards,
Dick Bridges


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk