
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" <boost-users-request@lists.boost.org> wrote: Send Boost-users mailing list submissions to boost-users@lists.boost.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.boost.org/mailman/listinfo.cgi/boost-users or, via email, send a message with subject or body 'help' to boost-users-request@lists.boost.org You can reach the person managing the list at boost-users-owner@lists.boost.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Boost-users digest..." Today's Topics: 1. Re: choosing source ip on multihomed computer (Bjorn Reese) 2. Re: [Threads] and OpenMP (Bjorn Reese) ---------------------------------------------------------------------- Message: 1 Date: Tue, 30 Sep 2014 15:58:37 +0200 From: Bjorn Reese <breese@mail1.stofanet.dk> To: boost-users@lists.boost.org Subject: Re: [Boost-users] choosing source ip on multihomed computer Message-ID: <542AB70D.6060807@mail1.stofanet.dk> Content-Type: text/plain; charset=windows-1252; format=flowed On 09/30/2014 03:04 PM, David Frank wrote:
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 <breese@mail1.stofanet.dk> To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Threads] and OpenMP Message-ID: <542AB74F.4010303@mail1.stofanet.dk> Content-Type: text/plain; charset=windows-1252; format=flowed On 09/30/2014 11:24 AM, Stephan Menzel wrote:
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 ********************************************