9 Sep
2019
9 Sep
'19
7:47 a.m.
Hello,
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