Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Websocket handler module: running exe and starting 2 threads |
|
Author |
|
giustino
Joined: 21 Feb 2014 Posts: 2
|
Posted: Fri 21 Feb '14 19:28 Post subject: Websocket handler module: running exe and starting 2 threads |
|
|
Hi everyone,
Currently, websockets are running well with python websocket module (mod_pywebsocket) on my apache server.
But now, i need to convert python code part into C because i replaced mod_pywebsocket with mod_websocket (apache module).
Normally, that would not be a big deal. But i'm not familiar with apache libraries (apr_* and all those types). How could i write a similar code in C that would run an executable and start 2 threads ?
Actually, my python websocket handler is doing this:
It opens an executable (C++) and redirects stdin/stdout.
Then it runs 2 threads: one called ThreadReader and the other called ThreadWriter.
Can someone give me some help with apache C structure of code to run an executable and create 2 threads in the websocket handler ? |
|
Back to top |
|
jimski
Joined: 18 Jan 2014 Posts: 196 Location: USSA
|
|
Back to top |
|
giustino
Joined: 21 Feb 2014 Posts: 2
|
Posted: Sat 22 Feb '14 14:30 Post subject: |
|
|
Thank you but this is not what i need.
Posix thread is something i can do. The main problem here is APR from apache. I'm not very familiar with it.
Right now, i'm learning APR and i'm trying to run an executable using (with pipe for stdin/stdout).
I also saw how to manage threads in APR. Maybe i'll find a way through but if someone can help me, i won't say no |
|
Back to top |
|
|
|
|
|
|