Re: Handling multiply requests

At 17:10 08/12/1998 -0000, Mikhail Grouchinski wrote:
>I need to implement an application that would
>be able to receive messages from one socket (TCP stream) parse them and
depending on content create
>HTTP requests. (Something like proxy with only one income connection). It
shouldn't block until reply is received. Many requests can be sent
simultaneously. I'd like to use select() on all the sockets including
income TCP and outgoing HTTP. How can I implement this in LibWWW? 
>
>In fact this is the question of how can we implement a proxy (without
caching, only tunneling) with LibWWW? 

It is not clear whether the incoming messages are HTTP request but in any
way, this is possible to do with libwww. One way to do this is to have the
TCP stream handled outside libwww and only use it for HTTP requests. As you
can use the same event loop then all operations can be done in a
non-blocking manner.

However, there is in fact a server interface in libwww although it hasn't
been used for a while and doesn't quite work. I tried just to get it back
up and running and it is almost there but I am IETF right now and so you
will have to wait until I get back. However, this would allow you to both
accept and initiate TCP connections and to have an incoming stream as well
as outgoing streams.

Henrik
--
Henrik Frystyk Nielsen,
World Wide Web Consortium
http://www.w3.org/People/Frystyk

Received on Friday, 11 December 1998 10:42:10 UTC