boost::corosio::tcp_socket::remote_endpoint
Get the remote endpoint of the socket.
Synopsis
Declared in <boost/corosio/tcp_socket.hpp>
endpoint
remote_endpoint() const noexcept;
Description
Returns the remote address and port to which the socket is connected. The endpoint is cached when the connection is established.
Thread Safety
The cached endpoint value is set during connect/accept completion and cleared during close(). This function may be called concurrently with I/O operations, but must not be called concurrently with connect(), accept(), or close().
Return Value
The remote endpoint, or a default endpoint (0.0.0.0:0) if the socket is not connected.
Created with MrDocs