Setting timeout less than a second?

Jul 7, 2015 at 10:16 AM
Can I set a timeout on http_client_config less than a second?
Coordinator
Jul 7, 2015 at 4:35 PM
Hi kreuzerkrieg,

No our API only supports specifying timeouts in seconds, and not less than one.

Steve
Jul 7, 2015 at 6:37 PM
any chance for millisecond support in foreseeable future?
Coordinator
Jul 7, 2015 at 6:39 PM
No there aren't any plans. You could add it if you are interested and we'd probably accept the changes back. If you can share I'm curious why do you need to set timeouts for under a second?

Steve
Jul 7, 2015 at 7:07 PM
Sure. My server requests information from another server in the same datacenter, usually the request roundtrip is measured in sub-millisecond, but lets say 1ms, sometimes it can reach 2-3ms, I'm still ok with it, but sometimes it can hit100ms. The data I request from the server is not vital for processing my own request serving but latency of my server does matter, so I would like to abort my request to the other server after, lets say, 3ms. Sure I can work around it by wrapping asynchronous call to another server with some asynchronous function, returning future and call wait_for(3ms) and then just abandon it but it is somewhat not elegant :)
Coordinator
Jul 7, 2015 at 10:13 PM
I see. We do accept contributions back to the library if you'd like to add it. What platform are you running on, Windows desktop/server?

Steve
Jul 8, 2015 at 5:24 AM
yep, win platform. I will take a look what can I do there
Jul 10, 2015 at 4:13 PM
stevetgates wrote:
I see. We do accept contributions back to the library if you'd like to add it. What platform are you running on, Windows desktop/server?

Steve
Hi Steve,
I've made some changes, do you have regression tests I can run before we discuss the change? Second, how do you accept changes (technically)?
Coordinator
Jul 13, 2015 at 11:42 PM
Hi kreuzerkrieg,

Yes you can run our functional test cases. They are pretty easy to compile and run on Window desktop. Take a look here for instruction on how to build and run the tests. For your changes you probably only need to run the HTTP client test cases.

Once you have the tests running you can submit a pull request here on CodePlex to the development branch. In order to be able to accept and merge your changes back into the product if they are anything but trivial I'll need you to sign our contributor license agreement. You can email the signed CLA directly to me at stgates at Microsoft dot com.

Let me know if you have any further questions.

Steve