From: Sam S. <sd...@gn...> - 2003-01-29 15:27:09
|
> * In message <159...@is...> > * On the subject of "Re: [clisp-list] proposed modifications to SOCKET-STATUS" > * Sent on Tue, 28 Jan 2003 21:38:14 -0800 > * Honorable don...@is... (Don Cohen) writes: > > > > Could you please tell us what those new values mean? > > > > :ERROR: next i/o will generate an error > > :INPUT: only input is possible (or requested) > > :OUTPUT: only output is possible (or requested) > > :IO: both input and output are possible > > :EOF: input --> EOF, output impossible or not requested > > :APPEND: output possible, input --> EOF > > :WAIT: both output & input --> hang (or not requested) > > What's this requested stuff? see <http://clisp.cons.org/impnotes/socket.html#so-status>, specifically the table "Possible values of socket-stream-or-list". > Under what circumstance would io cause an error? see select(2), "exceptfds". > So, if I understand, input can do three things: > - wait > - eof > - return immediately with "real" input > whereas output can only do 2: > - wait > - return immediately it can also signal an error if the other side has closed the connection, but I don't know how to check for this. > You call these > > input > wait real eof > output +------------------------- > return| output io append > wait | wait input eof > > It seems to me that you might want another row for output when > the output direction has been closed. In that case I guess output > would give an error? yes, almost: [7]> (format o "foo") NIL [8]> (format o "foo~%") [stream.d:13629] *** - UNIX error 32 (EPIPE): Broken pipe, child process terminated or socket closed 1. Break [9]> i.e., the error is only after a NL. how do I check for this? -- Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html> Life is like a diaper -- short and loaded. |