[usocket-devel] Detecting whether the other end has closed my socket stream

Roger Sen Montero roger.sen at gmail.com
Wed Mar 13 16:24:07 UTC 2013


Hi all!!

 The FAQ states:

 Reading from a stream which has been closed at the remote end signals an
END-OF-FILE condition, meaning that reading from the stream and detecting
that condition is the way to do it.

 But when a create a server with:

 :element-type 'character

 I'm able to get an "Unexpected end of file" condition on the server side
when the client disconnect.

 Unfortunately, when I create the server with:

 :element-type 'unsigned-byte

 I do not get the condition, so I'm unable to detect when a client has
disconnected.

 Also, is there any plan to support utf8 streams directly without creating
unsigned-byte sockets and converting from/to string to string-utf-8-bytes?


 thanks!
-- 
Roger Sen Montero
roger.sen at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/usocket-devel/attachments/20130313/35488018/attachment.html>


More information about the usocket-devel mailing list