-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http-request connection-timeout parameter #61
Comments
Mark, I do not concur with your reading of the description. The documentation -Hans 2015-07-06 20:34 GMT+02:00 Mark Meyer [email protected]:
|
You're correct despite the documentation saying so, usocket does not set a proper read timeout. I just took the read timeout code for sbcl from hunchentoot and enabled the read-timeout parameter in drakma for sbcl. I'll be testing that till tomorrow. |
2015-07-08 6:14 GMT+02:00 Mark Meyer [email protected]:
It is not usocket that does not set a "proper" timeout in this case, but The deadline option on CCL is known to work well. -Hans |
Hi Hans, |
I don't think that Drakma should offer a way to set timeouts without also
offering a portable way to catch timeouts. Maybe a better approach would
be to offer a hook that Drakma calls once the socket is opened. In that
hook, one could set timeouts in whatever way the implementation offers.
|
That seems sensible. Either provide a hook to set the implementation defined parameters of the socket or push down :read-timeout and :write-timeout into usocket. I'll be looking into the latter option tomorrow. I'll also have to ask the usocket people, under what conditions they would accept that addition. |
Sometimes I feel like stumbling through the world blindfolded.... https://github.com/usocket/usocket/blob/master/option.lisp usocket has a socket option implementation, which serves this purpose. The conditions are signalled portably. I'll give that a try. |
As of now, usoket:socket-connect on CCL passes the :connect-timeout ,timeout
:input-timeout ,timeout |
+1 here, connection-timeout should also become available in CCL. |
Hi Edi,
I just wondered why the documentation states that the parameter connection-timeout of http-request is the time drakma waits for a server to respond initially (that's how I read it). From the usocket documentation for socket-connect and its :timeout parameter over at https://common-lisp.net/project/usocket/api-docs.shtml this sets SO_RCVTIMEO which does have the effect of setting a timeout for connect() but it also determines the timeout for read() (but not for write()).
I'll be testing this tomorrow, since I need a timeout on drakma. Do you concur with my above description? May I submit a pull request to explain this a little more in the documentation?
The text was updated successfully, but these errors were encountered: