httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Morris <>
Subject Re: HTTP Streaming with Apache 1
Date Tue, 02 Mar 2010 22:04:55 GMT
    I don't know how to help you with the method you're
trying to use, but I may be able to help achieve your
goal simply and efficiently.  For a similar situation,
I just forwarded port 80 to port 8080 via the the
firewall.  Very simple and efficient, with no need
for any custom software to write.
Ray Morris

Strongbox - The next generation in site security:

Throttlebox - Intelligent Bandwidth Control

Strongbox / Throttlebox affiliate program:

On 03/01/2010 02:57:21 AM, Alexander Farber wrote:
> Hello,
> I have a game, a daemon listening at port 8080 for TCP clients.
> The clients send auth. details with each their message and
> I keep the state, so the TCP-connection can be interrupted
> and then reconnected and the game will still continue.
> To support players behind corporate firewalls :-) I've written a  
> simple
> Apache module, which will listen for client requests at the port 80,
> then read that POST request in, then connect to port 8080 and
> forward that data. Then it will stay connected to both ports and
> forward data from the game daemon to the web client:
> I want it to stay connected and "stream HTTP data" back, so that
> I can update the web clients instantly, when something changes.
> Perfect solution would be to poll() at the both sockets (80 and 8080)
> and forward the data in both directions. But unfortunately this
> isn't possible with Apache 1 (would it work with Apache 2?
> Can I get ahold of the client socket there and can I poll() it?)
> So I try the other trick: when the web client needs to send
> a new asynchronous message to the game daemon,
> I cancel the previous connection (unfortunately the Apache
> module doesn't notice that, because it is blocking while reading
> from the port 8080 socket) and also in the game daemon
> I take the notice, that a new message has arrived from the same
> user and close the port 8080 socket to the old Apache module.
> Unfortunately this works only few times and then I hit the max.
> children limitation of Apache (I've set it to 10 at my debug server)
> and Apache refuses to accept further connections.
> I'm using Apache 1.3.x of OpenBSD 4.5 and the source code
> of my Apache module is at
> Does anybody have any good comments?
> Thank you
> Alex
> PS: And my (Russian card) game is at
>  :-)

View raw message