Read Timeouts

Chun Tian (binghe) binghe.lisp at gmail.com
Thu Jul 9 18:44:37 UTC 2015


Hi Mark,

Are you talking about TCP? I think CMUCL doesn’t support it in a secret way, because when I was implementing the relatively new API, USOCKET:SOCKET-OPTION, I took following code from Hunchentoot for setting the timeout on socket streams in CMUCL:

    #+cmu
    (setf (lisp::fd-stream-timeout (socket-stream usocket))
          (coerce timeout 'integer))

I’m not sure if this is a “read timeout”, “write timeout” or both. But maybe you can have a try and tell me if it works? And if it is, I could adjust the definition of SOCKET-CONNECT function, to call above code when giving the TIMEOUT keyword argument.

Hope this helps,

Chun

Il giorno 09/lug/2015, alle ore 20:15, Mark Meyer <ofosos at gmail.com> ha scritto:

> Hi,
> I'd like to discuss implementing read timeouts in usocket. I quickly looked at the docs of some implementations and found that CCL, SBCL and ClISP support it mostly effortlessly, but CMUCL does not.
> 
> What's the policy for adding a feature? Does it have to be supported on all platforms?
> 
> Specifically I want to get a socket stream from usocket and handle a portable usockt:read-timeout-condition when a read timeout occurs.
> 
> Regards, Mark

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://mailman.common-lisp.net/pipermail/usocket-devel/attachments/20150709/32adb4cf/attachment.sig>


More information about the usocket-devel mailing list