httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug McNutt <dougl...@macnauchtan.com>
Subject Re: [users@httpd] Using named pipe in Apache directory
Date Fri, 20 Nov 2009 23:30:35 GMT
At 02:09 -0500 11/19/09, Xuan Zhang wrote:
>I am dealing with a little bit strange requirements in apache.
>I want to use an "named pipe" generated by mkfifo as a file in apache
>directory.  For example, I put one pipe file in as a.file in apache's
>directory and then generate the stream of snapshot of my screen into
>the pipe.  In this case, I hope the client who fetches the a.mp4 file
>would receive a stream of my screen.
>
>To test it,
>
>1. I set up a named pipe a.file
>2. I execute   cat < index.html > a.file
>3. I open a browser and try to access http://localhost/a.file
>
>However, when I tried to do this, I found apache just simply close the
>connection and the browser stay blank.

Since no one more familiar with apache than I has answered. . .

Apache is setting up a forked process to handle your request. It almost surely empties the
pipe while immediately passing something to the http user.

But header information may be screwed up and when the pipe gets empty, and it has to before
apache will send anything, the forked process will quit.

Even if such a stream might work it will require two named pipes unless I don't know something
about two way pipes. Perhaps there isn't much to pass from apache to your stream process.
But I would think that some synchronization like an interrupt from apache saying "send another
page".

Have a look at the way RSS - really simple syndication - works. I'm pretty sure that browsers
are simply told to refresh regularly so that each image gets a complete new  request with
something like a cookie that tells where you are in the "stream".

And I'm dead sure that someone around here knows a lot more than I do about it.
-- 

--> From the U S of A, the only socialist country that refuses to admit it. <--

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message