From the documentation I can see that socket::receive() returns a variable of type "std::size_t", while the asynchronous version socket::async_receive() returns "void". This is also true for socket::send() and socket::async_send().
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