|
From: Sam S. <sd...@gn...> - 2008-12-30 04:14:14
|
> * Bruno Haible <oe...@py...> [2008-12-30 02:33:31 +0100]: > >> Let us start with what we should do at the high level. >> We have a stream which will signal ECONNRESET on read. > > I would vote for signaling a STREAM-ERROR condition - so that the > program gets alerted about the abrupt termination of the socket - and > at the same time set the stream to a state equivalent to EOF - because > ECONNRESET is not a transient error condition. cool! this is what we do now - OS_filestream_error. no changes needed. however, I think returning :ERROR from socket-status makes more sense. (although this is certainly a step away from a simple select()). however, doing that is nontrivial from a coding POV: we would need to change low_fill_buffered_handle not to call OS_filestream_error but return a status instead &c &c. - is perserv==perserv_immediate. maybe it will even have to accept a separate argument because non-listen calls might also use persev_immediate... BTW, BufferedStreamLow_fill can be either low_fill_buffered_handle or low_fill_buffered_socket, and the latter does not check the sock_read's return value the way the former checks fd_read's return value... -- Sam Steingold (http://sds.podval.org/) on Ubuntu 8.10 (intrepid) http://dhimmi.com http://camera.org http://iris.org.il http://mideasttruth.com http://pmw.org.il http://palestinefacts.org http://openvotingconsortium.org Do not tell me what to do and I will not tell you where to go. |