Boost logo

Boost Users :

From: Klebsch, Mario (Mario.Klebsch_at_[hidden])
Date: 2019-09-09 07:47:45


> For example:
> operator()()
> -> kicks off first async_wait
> operator()(error_code)
> -> handles result of async_wait and kicks off async_read
> operator()(error_code, size_t)
> -> handles result of async_read and kicks off another async_wait

I sometimes use a single operator() with default values like this:

void operator()(const boost::system::error_code &ec= boost::system::error_code(), size_t bytes_transferred=0)

It can be called without an argument (for kick-off), with a single error_code (from async_wait) or with two argiments (from async_read).

73, Mario

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at