Am Dienstag, den 29.08.2006, 13:19 +0200 schrieb David MENTRE: > [ Could you please keep demexp-dev@ in Cc:, thanks. ] > > Hello Gerd, > > I'm looking at evaluating the complexity to implement *both* ONC RPC and > HTTP support in my server (currently it uses your rpc package). > Apparently, ocamlnet supports the HTTP protocol. But I'm wondering if it > is possible to handle two sockets with different handler for each > protocol with EQueue.
Yes, it is. For an example how to use nethttpd with equeue, look into the file_engine.ml example in the ocamlnet distro. The limitation is that there is no good support for handling large HTTP requests, i.e. everything must be in memory, or you have to manage to store such requests in temp files. Large HTTP replies should be no problem. > Should I use threads? Would you have any advice? I have good experience using several handlers with the same equeue, although I did not try yet the combination rpc+httpd. You should also look into the upcoming ocamlnet2. It includes a flexible server framework called netplex. Although its focus is multi-processing you can also do multiplexing and multi-threading with it. The latest version is here: http://www.ocaml-programming.de/packages/ocamlnet-2.2test11.tar.gz Includes already a lot of documentation. Gerd -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany [EMAIL PROTECTED] http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------ _______________________________________________ Demexp-dev mailing list Demexp-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/demexp-dev