Asynch requests/responses [Was Re: How can I handle an HT_UPGRADE 101 Message?]

Henrik Frystyk Nielsen wrote:

> I have added a small "upgrade" sample app and made a few changes to how it
> is handled in HTTP.c. Basically, now it simply calls a stream converter and
> feeds the rest of the data to that stream.

Thanks!  I no longer get errors when I receive 101 "upgrade protocol" errors.

I do have a follow-up question, however.  It is to do with asynch requests
and responses.

In my application, I must "pipeline" requests and get responses asynchronously.

Each request contains an identifier (as a header) that is reflected back in the

response, allowing me to match up the response with the original request.
Responses may be returned in any order.  It is even possible to receive more
than one response per request.

However, so far as I can see, even if I make multiple requests to the same
server,
each request is not written to the server until the previous one terminates.
Which
is not the behaviour I want - I want to be able to fire off several requests,
without
waiting for the previous ones to terminate.

What is the correct way to handle this situation within libwww?  I guess my
problem is that I don't understand pipelining sufficiently well.  Or, perhaps,
that
I should not really be doing pipelining at all, but instead MUXing?  (Although
it worries me that the Documentation marks the Mux protocol as being
"experimental").

Thanks in advance for any help,

Stuart
--
Stuart Myles -- smyles@wsj.com -- 609-520-7147 -- http://wsj.com

Received on Tuesday, 2 March 1999 11:55:16 UTC