[usocket-devel] "experimental-udp" branch merged into usocket trunk
Chun Tian (binghe)
binghe.lisp at gmail.com
Thu Jan 14 03:15:33 UTC 2010
Hi again,
在 2010-1-14,10:15, Elliott Slaughter 写道:
> One more request:
>
> Is there any way of having a timeout on socket-receive? Or at least have some way of checking whether there is any data waiting (so I don't have to block while waiting for packets to arrive)?
Yes, there're two ways:
1) When creating the UDP socket using SOCKET-CONNECT, you can set the keyword argument TIMEOUT, and SOCKET-RECEIVE will return in that seconds when there's no data received.
2) You can use WAIT-FOR-INPUT, the same way as TCP usockets.
--binghe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2603 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/usocket-devel/attachments/20100114/590bc5af/attachment.bin>
More information about the usocket-devel
mailing list