Endpoint requirements (or code) incorrect
Brought to you by:
chris_kohlhoff
The data() requirement in Endpoint states that it can return a pointer and the implementation will perform a reinterpret_cast to sockaddr*. As the "type" column just says "a pointer", I assume the "implementation" mentioned is the asio implementation, not the Endpoint implementation.
There is at least one point where this doesn't appear to be the case in 0.3.9. I changed my endpoint implementation to perform the reinterpret_cast itself to work around it.
The line where I found the issue was:
asio/detail/reactive_socket_service.hpp:1441
It appears to be similar for all calls of data() though.