Here's what I want to do. There will be a C++ application running on a remote machine, doing some testing. Then there will be a python application on the client machine: it will allow the user to tell to the remote machine what tests must be done, see the results of the tests and some tests may require human intervention so the python app must also provide that. So basically I need to have messages going two ways. Also the C++ app may need to restart, breaking the connection so we must be able to detect that and restore the connection.
Both apps should run on Linux, portability on Windows would be appreciated though not mandatory (if it means twice the work forget it).
I did a quick tutorial for socket programming in Python, and another one in C, I even managed to get the python client to connect to the C server, but I'm still quite lost.
- Python is portable but not C++ (winsock vs unistd); should I try to use Boost::Asio or some other portable library?
- Aside from basic tutorials like the ones I linked to, the topic explodes really fast and I feel like I don't need to absorb all that information; this should be something simple, just two applications sending a few messages to each other over TCP. Can you give some pointers on how to implement this?
By the way this is not homework, the point is to get it done, so I'm all for using existing components if they do the job instead of writing a lot of boilerplate code.
Question
Andre S. Veteran
Here's what I want to do. There will be a C++ application running on a remote machine, doing some testing. Then there will be a python application on the client machine: it will allow the user to tell to the remote machine what tests must be done, see the results of the tests and some tests may require human intervention so the python app must also provide that. So basically I need to have messages going two ways. Also the C++ app may need to restart, breaking the connection so we must be able to detect that and restore the connection.
Both apps should run on Linux, portability on Windows would be appreciated though not mandatory (if it means twice the work forget it).
I did a quick tutorial for socket programming in Python, and another one in C, I even managed to get the python client to connect to the C server, but I'm still quite lost.
- Python is portable but not C++ (winsock vs unistd); should I try to use Boost::Asio or some other portable library?
- Aside from basic tutorials like the ones I linked to, the topic explodes really fast and I feel like I don't need to absorb all that information; this should be something simple, just two applications sending a few messages to each other over TCP. Can you give some pointers on how to implement this?
By the way this is not homework, the point is to get it done, so I'm all for using existing components if they do the job instead of writing a lot of boilerplate code.
Thanks.
Edited by Dr_AsikLink to comment
Share on other sites
4 answers to this question
Recommended Posts