From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA16644; Thu, 13 Jun 2002 01:33:02 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA16564 for ; Thu, 13 Jun 2002 01:33:01 +0200 (MET DST) Received: from speakeasy.org (shawnw-0.dsl.speakeasy.net [64.81.17.141]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g5CNX0b22162 for ; Thu, 13 Jun 2002 01:33:00 +0200 (MET DST) Received: (from shawnw@localhost) by speakeasy.org (8.10.1/8.10.1) id g5CNWZC00591 for caml-list@pauillac.inria.fr; Wed, 12 Jun 2002 16:32:35 -0700 Date: Wed, 12 Jun 2002 16:32:35 -0700 From: Shawn Wagner To: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] Sending message to Http_client Message-ID: <20020612163235.R15305@speakeasy.org> Mail-Followup-To: caml-list@pauillac.inria.fr References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from gaurav_chanda@lycos.com on Wed, Jun 12, 2002 at 06:18:03AM -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Jun 12, 2002 at 06:18:03AM -0700, Gaurav Chanda wrote: > Hello > > I am trying to build a small http server that can interact with the > existing Http_client module present in the Netclient Library. > > I was succesful in establishing connection between the two. The data sent > by the client was received sucesfully. However, sending data back to the > client is giving me problems. > > I have written a loop in which my server writes "count" characters to the > file descripter "fd"., using "Unix.write". The server gets out of the loop. > However, on the client side, the function call "XmlRPCNet.handler#run" is > not returning. > > It is supposed to store the response of the http request from the server, > but is somehow not being able to do that. Or probably, I am doing something > wrong. > > Could you help me solve this problem ? > Normally, the Http_client.pipeline run method will return when the pipeline is empty, or raise an exception. My XML-RPC code you're working from will, if the run method raises an exception, re-call it. It's been a while since I've had time to work on it, and I'm afraid I'm a bit sparse on comments, but I think I did this to deal with a problem in non-blocking connects that take a while to complete. If I recall correctly, some exeception handlers in Http_client weren't getting invoked when they should have, but this problem went away after one of the times I recompiled it (And I've never seen it happen since, which is why I never reported a bug). I kept my attempt at a workaround in the XML-RPC code in place just in case. So, a possible explanation, assuming the server bits are working as intended: The run method is getting called (Possibly more than once) with something in the Http_client.pipeline that's not completing, causing to poll forever waiting for more information. Have you tried changing the Http_client.pipeline options in xmlRPCNet.ml to set all the verbose options true for better debugging of just where it's running into problems? -- Shawn Wagner shawnw@speakeasy.org ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners