Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Sending message to Http_client
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-06-12 (23:33)
From: Shawn Wagner <shawnw@s...>
Subject: Re: [Caml-list] Sending message to Http_client
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 to set all the verbose options true for better
debugging of just where it's running into problems?

Shawn Wagner
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: