[haiku-commits] Re: haiku: hrev50368 - src/kits/network/libnetapi headers/os/net

  • From: Hamish Morrison <hamishm53@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 22 Jun 2016 16:15:16 +0100

On Tue, Jun 21, 2016 at 10:23 PM, Adrien Destugues
<pulkomandy@xxxxxxxxxxxxx> wrote:

It can be useful in other cases as well. For example, an HTTP request
usually needs to know which hostname is used as it specifies it in the
request header. There may be similar uses in other protocols.

It depends if we want to consider BNetworkAddress as IPv4/6 centric, or
something a bit higher level and more friendly to upper layer protocols.

For me this is a good argument for keeping the hostname out of BNetworkAddress.

The hostname that is sent in HTTP headers or used for TLS SNI is an
application layer concern and should be dealt with at that level.
BNetworkAddress is operating at the transport/internet layer and
should just be concerned with addressing endpoints.

Other related posts: