I did, here is my relevant code segment, but the destination still shows that I sent from another ip than what I set here:
tcp::resolver resolver(fIo_service);
tcp::resolver::query query(tcp::v4(), host, port);
tcp::resolver::iterator iterator = resolver.resolve(query);
fpSocket = new tcp::socket(fIo_service);
if (fpSocket == nullptr)
return ;
fpSocket->open(boost::asio::ip::tcp::v4());
fpSocket->bind(boost::asio::ip::tcp::endpoint(boost::asio::ip::address::from_string("<ip>"), 0));
boost::system::error_code errcode;
boost::asio::connect(*fpSocket, iterator, errcode);
On Tuesday, September 30, 2014 12:00 PM, "boost-users-request@lists.boost.org"
I'm wondering how to make boost::asio::connect(<socket>, ...) connect from the source interface/ip address I choose on a multihomed computer.
Call bind() before connect().
------------------------------
Message: 2
Date: Tue, 30 Sep 2014 15:59:43 +0200
From: Bjorn Reese
So the question is: How can I more or less gracefully shut this down? How do interruption points work in an omp parallel for loop? Do I have a chance at all?
One approach is to execute the tasks in a separate process. The process can easily be killed, and it takes care of the memory leaks. ------------------------------ Subject: Digest Footer _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users ------------------------------ End of Boost-users Digest, Vol 3932, Issue 2 ********************************************