
Hi, How can I interpret and use the error_code in my application? As an example my ASIO async_read "handler function" receives one argument as error, as shown below void MyClass::AsyncReadHandler(const boost::system::error_code& error,std::size_t bytes_transferred) { } How can I inrterpret the "error" in a meaningful way? error.message() returns the meaning of the error and and error.value() returns an integer code associated with the error. So far fine, but how can I use it in a comparison operator in a portable way... if(error.value()==2) //Not readable { } if(error.value()==END_OF_FILE) //More readable { } So how can I get the respective "enum" associated with the error Thanks a lot, Lloyd ______________________________________ Scanned and protected by Email scanner