Boost logo

Boost :

From: Dave Gomboc (dave_at_[hidden])
Date: 2005-08-20 00:33:36


> - Consistency with a future asynchronous version of the same function.
> As a rule, in async versions of the functions complex structures or
> buffers need to be passed as arguments, andthe only difference between
> the sync and async functions is the callback handler, i.e.:
>
> void operation(parameters);
>
> template <typename Handler>
> void async_operation(parameters, Handler handler);

Treating synchronous and asynchronous differently here seems less generic
than always using

    template <typename Handler>
    void operation(parameters, Handler handler);

Would it be bad to do it this way (possibly with a synchronous
handler defaulted?)

> Yes, I agree that read and write are better, because of the
> "portability" of the names to non-sockets that it gives. I've wanted to
> make that change for some time, but the thing that has been preventing
> me is what to call the datagram functions sendto and recvfrom, as
> writeto and readfrom don't seem quite right. Any suggestions?

I don't perceive what's wrong with "write_to" and "read_from".

Dave

P.S. I saw in another Boost posting a poster using email address
sid_at_6581.com. It's nice to see that there's other C=64 oldtimers out
there! ;-)


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