asio async call terminology

I'm working on my review and I want to make sure I am using the correct terminology. There two sorts of asynchronous calls that can be made. The first is a "operation" which results in one trip through the dispatcher. For instance asio::socket_stream::write_some(). Internally these are stored in operation classes, hence the terminology. The second I'm calling a "request" which results in one or more "operations" to occur before the user handler is dispatched. For instance asio::async_write() calls asio::stream_socket::write_some() one or more times. Does that sound right?

Hi Christopher, --- christopher baus <christopher@baus.net> wrote:
There two sorts of asynchronous calls that can be made.
The first is a "operation" which results in one trip through the dispatcher. For instance asio::socket_stream::write_some(). Internally these are stored in operation classes, hence the terminology.
The second I'm calling a "request" which results in one or more "operations" to occur before the user handler is dispatched. For instance asio::async_write() calls asio::stream_socket::write_some() one or more times.
I've started using the term "composed operation", based on the fact that these operations are composed of one or more other operations. However I'd like to point out that the distinction is not as clear cut as between say asio::async_write() and asio::stream_socket::async_write_some(). The asio::async_write() function is actually implemented in terms of Stream::async_write_some(), where Stream is a concept I have defined. This Stream concept is implemented by stream_socket, but also by ssl::stream, buffered_read_stream and so on. It allows compile time polymorphism, so that functions like asio::async_write() can operate on any of these types. Furthermore, the async_write_some() functions on some of these classes are themselves composed operations, since they may call async_write_some() on the underlying stream one or more times. Cheers, Chris
participants (2)
-
christopher baus
-
Christopher Kohlhoff