vendredi 14 août 2015

C++ process to interact with requests from web clients

I have a C++ program which accepts input via stdin, and gives output via stdout. This program runs on a server. I also have a simple HTML page, where remote clients can input data into a textbox, which will be sent to the server, and then into the stdin of the C++ program. The C++ program should handle all requests without reloading itself each time (so using php's exec function won't work probably).

What is the simplest way to achieve that ?

  • I would prefer not to use sockets
  • I've tried PHP's proc_open, but I couldn't find a solution for flushing the stdin buffer that actually works (although many answers were given for that problem)

Aucun commentaire:

Enregistrer un commentaire