14 Jun
2018
14 Jun
'18
2:04 p.m.
From the documentation I can see that socket::receive() https://www.boost.org/doc/libs/1_58_0/doc/html/boost_asio/reference/basic_da... returns a variable of type "std::size_t", while the asynchronous version socket::async_receive() https://www.boost.org/doc/libs/1_58_0/doc/html/boost_asio/reference/basic_da... returns "void". This is also true for socket::send() https://www.boost.org/doc/libs/1_58_0/doc/html/boost_asio/reference/basic_da... and socket::async_send() https://www.boost.org/doc/libs/1_58_0/doc/html/boost_asio/reference/basic_da... . I was expecting that they would have the same return types, so there might be a good reason behind.
I would be grateful if someone can shed some light on this. Thank you. Álvaro