W3C home > Mailing lists > Public > www-lib@w3.org > October to December 1998

Patch for using libwww to accept incoming connections

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Tue, 15 Dec 1998 00:34:56 -0500
Message-Id: <>
To: www-lib@w3.org

For those of you who want to use libwww for both clients and servers...

Although libwww is primarily for clients, it is in fact symmetric in that
it can handle both client requests and server requests. The way this is
handled is that each protocol is registered with both a client handler and
a server handler - depending on which type of request you use, one of them
is called. Note that in order to be able to serve any document, there
actually have to be a server handler. Currently, libwww only comes with a
raw socket loader which isn't much of a server.

The protocol handler used to serve the request is determined by the URI -
just as for client side requests. That is, libwww can in fact
simultaneously be the server for multiple protocols if you really want to.
Examples of URIs that you can use are noop://localhost:8888 which means
that libwww starts listening on port 8888 (see the listen example for
details). Other examples are http://localhost:7777 which means that it
listens for HTTP on port 7777. Again, there is no HTTP server in libwww -
this is just an example.

I have now resurrected an old socket listen tool which you can find at


I have committed this to CVS - it doesn't (shouldn't) affect client side
one bit. Here is that complete diff

As usual, you can get it from CVS as described in


and recompile as described in


Henrik Frystyk Nielsen,
World Wide Web Consortium
Received on Tuesday, 15 December 1998 00:35:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:48 UTC