[usocket-devel] [drakma-devel] [patch] Resubmit drakma timeout for sbcl.

Chun Tian (binghe) binghe.lisp at gmail.com
Sun Mar 27 18:24:58 UTC 2011


Well, I think the TIMEOUT keyword arguments on SOCKET-CONNECT currently has following meanings:

1. When doing TCP work, it means a "connection timeout";
2. When doing UCP work, it sets the default "read timeout" (because "connection timeout" is meaningless for UDP);

The TIMEOUT keyword arguments was added from 0.4.0 (released on Oct 2008, more than two years ago), so I think Drakma should try to use it.  However, it may not work on all supported platforms -- I remembered.  But this should be considered as bug, I'll try to fix it after a small rewrite of our unit test framework.

On the other hand, for "read timeout" and "write timeout", they're changeable properties (or options) for any socket objects. A new API called SOCKET-OPTION (learnt from CLISP) should be added in next USOCKET major version.  Dynamically setting options like "broadcast" and "reuse address" should also be added under SOCKET-OPTION.   I see hunchentoot has a function called SET-TIMEOUTS, which can be used to set "read timeout" and "write timeout" for any exist usocket, I want to merge it into usocket under the new SOCKET-OPTION API.

--binghe

在 2011-3-28,01:50, Edi Weitz 写道:

> 2011/3/27 Chun Tian (binghe) <binghe.lisp at gmail.com>:
> 
>> Could you tell me what exact timeout feature they want? Setting Read/Write timeout when doing SOCKET-CONNECT? or Apply new timeout values to exist usocket object?
> 
> The LW version of Drakma supports connection timeouts, read timeouts,
> and write timeouts.  Existing usocket objects wouldn't be modified.
> 
> Cheers,
> Edi.





More information about the usocket-devel mailing list