[iolib-devel] send-to question
Stelian Ionescu
sionescu at cddr.org
Sun Mar 14 18:00:30 UTC 2010
On Sun, 2010-03-14 at 01:23 -0600, Peter Keller wrote:
> Hello,
>
> Under what situations does IOLib's send-to fail on a TCP socket and how
> does it fail?
>
> An example for a TCP receive-from is when it tries to read from a closed
> connection it returns 0 bytes--as oposed to read-line from a closed
> connection which results in a signaled END-OF-FILE condition.
>
> write-line will produce a hangup on a closed connection remotely, but
> what will send-to do on a closed connection remotely? Return 0? Signal
> a HANGUP? In practice it seems to "write" however many bytes I asked it
> to the nonexistent client and return the number of bytes written. I was
> expecting a signaled HANGUP instead. What's the deal?
You should get a condition, namely ISYS:EPIPE, but apparently Linux
doesn't return EPIPE with loopback connections
--
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/iolib-devel/attachments/20100314/8864b883/attachment.sig>
More information about the iolib-devel
mailing list