|
Robert Sanderson
azaroth at liverpool.ac.uk
Tue Jul 1 15:53:15 EST 2003
> The normal way of dealing with this sort of thing is by calling select()
> on a socket which will then call your function when there is anything to
> read. I don't know whether APR provides this.
Right. I can't see it anywhere, but that doesn't mean it's not available.
> I think your only option is to read a byte at a time, making sure that
> when you receivie a complete frame/packet/whatever you stop reading so as
> to not block indefinitely.
Yep, I've now successfully implemented a Z39.50 connection handler using
mod_python and PyZ3950 under Apache using this technique, though it's not
pretty having to try to parse a PDU after reading in each byte.
Cheers,
Rob
--
,'/:. Rob Sanderson (azaroth at liverpool.ac.uk)
,'-/::::. http://www.o-r-g.org/~azaroth/
,'--/::(@)::. Special Collections and Archives, extension 3142
,'---/::::::::::. Nebmedes: telnet: nebmedes.o-r-g.org 7777
____/:::::::::::::. WWW: http://nebmedes.o-r-g.org:8000/
I L L U M I N A T I
|