[Gllug] re: listening on more than 1 IP address

t.clarke tim at seacon.co.uk
Fri Sep 26 09:55:55 UTC 2003


Thanks guys for the various replies and example code

I was rather hoping that there would be a way of avoiding binding to two
sockets and using select/poll to pick the one to read from !
I have done this before in some other program and it works, so I guess I
could re-use the code - I was just wondering if there was an easier way I
was somehow missing.

Upon reflection it occurs to me that in the particular situation I am
currently listening on 127.0.0.1 only, but I need also to listen to a
192.168.123.001 address (being the internal LAN ethernet card).  So I guess if
the application that currently connects to 'localhost' (which maps to
127.0.0.1) connects to 'machine-name' (which maps to 192.168.123.001) I should
then be able to talk to the server from both within its own host machine and
from others machines on the internal LAN.  THis might seem to be a bit of a
bodge, but it should work  - since I can telnet to 192.168.123.001 on the
same machine.

Any problems with this approach ?

Tim

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list