Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Selectable HTTP client ?

Moderators: larsivi kris

Posted: 08/21/07 11:45:30 Modified: 08/21/07 11:45:46


I want to use More precisely, I want to manipulate several HttpClients? and Sockets simultaneously, without using threads. This means I need to register the HttpClient? with a Selector.

How can I do that ?

Author Message

Posted: 09/01/07 23:58:30

In a word, tricky :)

HttpClient? creates its own conduit to the URI host, and waits (synchronously) for a response. You have to turn the HttpClient? body inside-out to do what you suggest, but it's not hard. Most of the HttpClient? code is handling special cases and so on ... the rest is mostly encapsulated in other modules, so you could write an asynchronous version without much difficulty?

Posted: 11/20/07 05:54:22

The libcurl multi interface supports this. It has D bindings.