I want to connect to a server socket specified by a destination ip address and port number.
boost::asio::connect seems it does not allow to use this. I have ip destination as a unsigned int value.
Update: I am able to do
ba::ip::tcp::endpoint endpoint( ba::ip::address(ba::ip::address_v4(req.IpDst())), ntohs(req.Port()));
But how can I use endpoint with connect ?
It is possible to use:
socket.connect(endpoint);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With