guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to notice abrupt tcp connection losses in server/client?


From: Chris Vine
Subject: Re: How to notice abrupt tcp connection losses in server/client?
Date: Sat, 23 Jun 2018 12:42:52 +0100

On Fri, 22 Jun 2018 22:17:51 +0200
Zelphir Kaltstahl <address@hidden> wrote:
[snip]
> ... it returns 0 for end of file (what is the difference between this
> and end of file object?

R6RS states that "The end-of-file object is returned by various I/O
procedures when they reach end of file".  It can be obtained by invoking
the R6RS eof-object procedure and can be queried with the eof-object?
predicate, so '(eof-object? (eof-object))' will evaluate to true.  R6RS
also says "The end-of-file object is not a datum value, and thus has no
external representation".

0 is an integer.  POSIX read() and recv() indicate end-of-file by
unblocking and returning 0.  Subsequent calls to read() or recv() might
return -1 indicating an error, in which case recv! would throw an
exception.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]