modifying libwww/writing to a given fileno.../polled multiple IO

Darrell Berry (darrell@shrine.cyber.ad.jp)
Thu, 11 May 1995 20:25:59 +1000


I'm doing is a modification of the libwww library to support simultaneous
polled www'requests without forking...has anyone already done a version
that does this?

---

If not, the technical part of the problem is:

How do I write to a file given its fileno rather than a file handle?

What I want to do is build an array of fileno pairs (infileno, outfileno),
then build a polling loop that uses select to repeatedly check for new data
on the infilenos and write it out to the outfilenos while also doing other
stuff (user interaction etc) in the idle periods (classic Mac Main Event
Loop for those who remember what _they_ were like)...where the infilenos
identify net data coming in, and the outfilenos identify physical local
files...

This is so I can do multiple i/o streams inside a polled loop... (my perl
implementation (MacPerl) doesn't have subprocesses/forking, you see)


Or am I going about this totally inside out?




------------------------------------------------------------------------------
 darrell berry              :                   i r i s / e
 darrell@shrine.cyber.ad.jp :  7-3-48-1 shinjuku shinjuku-ku tokyo 160 japan
..............................................................................
              http://shrine.cyber.ad.jp/~darrell/irise.html
------------------------------------------------------------------------------