Re: ifile lexing question
"Clemens Fischer" <[email protected]>
| Newsgroups | gmane.mail.ifile.general |
|---|---|
| Message-ID | <[email protected]> |
[email protected] writes: > [...] I > want to schlep a message over a pipe from client to server without > necessarily closing the pipe afterward to send an EOF. The lexing > code seems to run 'til EOF at the moment, but it looks like I could > maybe set an "end of document" pattern somewhere, and then just > terminate a message-send with something like > "\n------IFILE_END_OF_MESSAGE-----\n" or somesuch. i'd strongly suggest a unix-domain socket for this. the behaviour of pipes over various platforms differs considerably, and with a socket this could be easier. there are tools for this (google for "UCSPI"), so you'd call up programs instead of complicated code. also, people who'd like to be able to use the ifiling over a network, which is bound to happen sometime in the future, could be using an option to change this to inet-type of sockets without much change. http://www.superscript.com/ucspi-ipc/intro.html http://untroubled.org/ucspi-unix/ unfortunately, these require getpeereid(2), which exists in linux for ages, but has been introduced to freebsd-stable only in versions 4.6+. open- and netbsd also contain this call. in ucspi-unix this call is optional. -- clemens