caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Shawn Wagner <shawnw@speakeasy.org>
To: caml-list@pauillac.inria.fr
Subject: Re: [Caml-list] Sending message to Http_client
Date: Wed, 12 Jun 2002 16:32:35 -0700	[thread overview]
Message-ID: <20020612163235.R15305@speakeasy.org> (raw)
In-Reply-To: <AIDIELHADOPIOAAA@mailcity.com>; from gaurav_chanda@lycos.com on Wed, Jun 12, 2002 at 06:18:03AM -0700

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


      reply	other threads:[~2002-06-12 23:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-12 13:18 Gaurav Chanda
2002-06-12 23:32 ` Shawn Wagner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020612163235.R15305@speakeasy.org \
    --to=shawnw@speakeasy.org \
    --cc=caml-list@pauillac.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).