Boost logo

Boost :

From: JH (jupiter.hce_at_[hidden])
Date: 2019-09-23 00:00:07


Hi,

I have searched the documents, but still could not clarify how to bind
the socket to a local IP address, which API could I add my local IP
address to it?

socket.bind(boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), 12345));
.......
boost::asio::ip::tcp::resolver::query query(remoteServerIPAddress, portNumber);

Thank you.

Kind regards,

- jh


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk