7 Aug
2009
7 Aug
'09
1:38 p.m.
[4) why not check socket state and if it was cancelled then set error code to corresponding value?]
From the point of view of the service, a handler is just a functor that can be invoked as "f()": http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/reference/Handler.h...
But even if we put aside the design/technical aspects and concentrate on the semantic ones: why should the error indicate cancellation if we were too late to cancel the operation and it actually managed to succeed?