Hi Chun,
On Wed, 2010-12-08 at 14:30 +0800, Chun Tian (binghe) wrote:
Hi, there
So, you want to override the default read time (when creating the usocket) sometime when you're calling SOCKET-RECEIVE. OK, extra keyword parameter is just for platform specific needs, you patch accepted as r571.
Thanks. In the current API neither socket-connect nor socket-receive methods use a timeout parameter for a datagram socket in LispWorks backend.
But if you take a look at my implementation of SOCKET-RECEIVE, you'll find the "temp" TIMEOUT keyword argument will be set into underlying socket by "setsockopt", and the previous default value will be set back when SOCKET-RECEIVE finishing it's work. Due to such double costs, I think this feature should not be used to much. In next USOCKET versions, I'll provide a SOCKET-OPTION generic function to be able to set most socket options (include RCVTIMEO) after sockets were created, I hope this could fit your needs better.
That would be the best way to control socket options.
--binghe
在 2010-12-8,13:31, Kamil Shakirov 写道:
Hi List,
As datagram socket-receive generic function allows to pass extra key parameters, would it be possible to add extra timeout parameter for LispWorks backend? The attached patch adds this feature.
--ska <0001-Receive-timeout.patch>_______________________________________________ usocket-devel mailing list usocket-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel
--ska