|
From: | Jim Ursetto |
Subject: | Re: [Chicken-users] socket egg: socket-receive blocks? |
Date: | Fri, 14 Jun 2013 15:24:58 -0500 |
Hi, It's a bug in the socket egg; nonblocking mode is only set during a socket-connect or socket-accept, which won't be called for UDP. Temporary workaround: (use posix) and then, after creating the socket, do either: (##sys#file-nonblocking! (socket-fileno *socket*)) or equivalently (file-control fcntl/setfl (socket-fileno *socket*) (bitwise-ior (file-control fcntl/getfl (socket-fileno *socket*)) open/nonblock)) Neither workaround will work on Windows. Permanent fix: We should probably make all sockets nonblocking at creation time instead, since our machinery assumes nonblocking sockets. We could expose the set-nonblocking operation to the user, but since TCP is always nonblocking, doing this only for UDP would be strange. Thoughts? Jim On Jun 14, 2013, at 11:01 AM, Kristian Lein-Mathisen <address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |