[1054] in Coldmud discussion meeting

root meeting help first previous next next in chain last in chain last

[COLD] Binding to Multiple IP Addresses

daemon@ATHENA.MIT.EDU (Tue Jul 30 15:21:55 1996 )

Date: Tue, 30 Jul 1996 11:51:30 -0600 (MDT)
From: Brandon Gillespie <brandon@tombstone.sunrem.com>
To: coldstuff@cold.org

Ok, patch 11 will let you bind to multiple different ip addresses.  The 
changes needed to a db are minimal.  Basically, you can (but are not 
required) to call bind_port() with a second argument of the host to bind 
to.  For instance, you can do either:

    bind_port(1234, "")

The first would just generically bind port 1234 to all addresses the 
system listens to.  The second would bind port 1234 JUST to the specified 
address, so if the machine also handled the address "" 
connection attempts to port 1234 on the second address would fail, unless 
a specific bind was made for that address.

From this point, when a connection is made the object which the port is 
bound to receives a method call to '.connect()'.  Currently the arguments 
for this method are:

    arg host, socket;

Now, the arguments are:

    arg client_host, server_host, socket;

So a connect from my workstation ( to a port bound by the 
second bind_port() example above would result in the following args:

    "", "", xxxxx

(the socket is rather irrelevant, and should actually be removed)

Note: specifying internet names will not work, you must first use 'ip()' 
to obtain the internet address from the internet name.  Once we get 
asyncrynous name lookups functioning I will go through and integrate 
automatic name lookups into everything.

-Brandon Gillespie