How do I get HTHost_listen to listen on a particular port?

Friends

What I want is to open a socket, connect to it (from another
application) and get my hands on all the data written to that socket
from the other application.

To that end I want to start listenoing on a port.

I am using HTHost_listen.  Is that the correct function?

It is not documented (surprise!) in
http://www.w3.org/Library/User/Extrnals.html but I found it in the
source and appears to be the mate to HTHost_accept.

Guessing wildly I implement it so...
host_local = HTHost_new("127.0.0.1", 8088);
net_local = HTNet_new(host_local);
host_remote = HTHost_new("", 0);
net_remote = HTNet_new(host_remote);
HTNet_setTransport (net_remote, HTTransport_find (0, "tcp"));
if(HTHost_listen(host_local, net_remote, "127.0.0.1") == HT_ERROR){

I get a listening socket, but on a different port.

So can anybody point me in the right direction?  I am starting to
think that I a\should be lookng for a different library!

Worik

-- 
                     Worik Macky Turei Stanton
                          worik@noggon.co.nz
                              Aotearoa
    This line would not have seven words if only it had eight words less.

Received on Saturday, 17 March 2001 17:04:57 UTC