--address vs --hostname
yoshuawuyts opened this issue · 2 comments
In #2 we ended up going with --hostname
to define the IP. But as per #2 (comment), this might not be the ideal option.
This is possibly too late, but re address vs hostname: my suggestion of address was intentional. This isn't a URL, and address is the name used in the socket API and the TCP RFC.
I'm opening up this issue to continue the discussion in a proper issue, rather than on a merged PR.
@kamalmarhubi is it from this RFC? The word "address" doesn't seem to be clearly defined anywhere (whereas port seems a bit more clear). I found the following instances in the RFC:
Socket
It seems "port" is defined here as part of "address", which seems different from what we're trying to achieve.
socket
An address which specifically includes a port identifier, that
is, the concatenation of an Internet Address with a TCP port.
Source Address
I'm not sure what they mean here by "network and host identifiers". Would that include the port also, or is that just the IP?
Source Address
The source address, usually the network and host identifiers.
Multiplexing
"addresses or ports" sounds like they're mutually exclusive, which doesn't seem to work with what we're trying to do either.
Multiplexing:
To allow for many processes within a single Host to use TCP
communication facilities simultaneously, the TCP provides a set of
addresses or ports within each host.
Oh I also just found this. Is this the part you're referring to?
2.7. Connection Establishment and Clearing
To identify the separate data streams that a TCP may handle, the TCP
provides a port identifier. Since port identifiers are selected
independently by each TCP they might not be unique. To provide for
unique addresses within each TCP, we concatenate an internet address
identifying the TCP with a port identifier to create a socket which
will be unique throughout all networks connected together.
This does make it sound like address
and port
are counterparts. You're probably right that address then makes more sense!