Alas, one of my "To Do" comments from 4 years ago has come back to
bite me:

sock_listen(...)
{
    ...
    /* XXX do we need to set the local host info when we're listening? */
    ...
}

Here's the problem: when you say

   f := open(":1234", "na")

what is the behaviour you expect if the machine you're running on has
more than network interface? Currently, the 'host' part of a "na"
address has to be empty because you can only accept a connection on the
local host. However my machine has 3 interfaces: 127.0.0.1, 192.168.1.1 
and 63.95.167.154.

How does this sound: ":1234" means accept on all interfaces this
machine has. Otherwise it must be specified: "192.168.1.1:1234".

This same sort of thing applies to send:

    f := open(":1234", "n")

*always* means 127.0.0.1 - which sounds a bit hard-ass. The
alternative is that to connect to a socket, the host must always be
specified. [The latter sounds a little "un-Icon" and the former is
rich with potential for confusion because my server happened to be
listening at 192.168.1.1 but I tried to connect to 127.0.0.1.]

-s


_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to