poukill

2

votes
0

answer
25

views

Bind UDP socket to specific network interface using Boost.Asio

My PC has several network cards and I'm trying to receive UDP data from several broadcast devices. Each device is isolated on a dedicated network and I'm trying to read UDP data from multiple devices at the same time. I'm using Boost version 1.67. Let's pretend in this post that I want to get data f...
poukill
2

votes
0

answer
10

views

Bind socket to specific network interface using Boost.Asio

My PC has several network cards and I'm trying to receive UDP data from several broadcast devices. Each device is isolated on a dedicated network and I'm trying to read UDP data from multiple devices at the same time. I'm using Boost version 1.67. Let's pretend in this post that I want to get data f...
poukill
3

votes
1

answer
2.2k

views

Stopping async_connect

I currently use Windows 7 64bit, MSVC2010 and Boost.Asio 1.57. I would like to connect to a TCP server with a timeout. If the timeout expires, I should close the connection as soon as possible as the IP address (chosen by a user) is probably wrong. I know I should use async requests because sync req...
poukill
3

votes
3

answer
813

views

Receiving UDP packets at high frequency : packet loss?

I have a C++ application which uses a UDP Server (using Boost.Asio) that receives packets from a gigabit local network device at a high frequency (3500 packets per second). Some users report a few packet losses. So in the end I chose to run in parallel WireShark and my application to check if there...
poukill
2

votes
2

answer
868

views

Embedding Python in Linux program

I am currently trying to embed Python in my C++ application to give the user advanced scripting possibilities. My program is working great on Windows so far (it is fully working), and now I'm trying to do the same on GNU/Linux (Debian 7 for now) but this is giving me much more trouble than I expecte...
poukill
4

votes
1

answer
939

views

Python GIL and threads

I have embedded Python3 in my big C++ application. Python gives the user script capability for custom data processing. Problem : I have many threads that interact with Python and I don't really get how to protect my code with GIL. So far, the only way I made my code work is using boost::mutex. Her...
poukill
3

votes
1

answer
832

views

Python C API - Reload a module

I use Python 3.4 and Visual 2010. I'm embedding Python using the C API to give the user some script capabilities in processing his data. I call python functions defined by the user from my C++ code. I call specific function like Apply() for example that the user has to define in a Python file. Suppo...
poukill