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

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 28 Jun 2016 10:28:34 +0200

Am 28/06/2016 um 09:47 schrieb Adrien Destugues:

28 juin 2016 09:38 "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> a écrit:
Am 27/06/2016 um 07:20 schrieb Adrien Destugues:
I disagree. How about adding constructors to BSecureSocket like those in 
BNetworkAddress instead:
[...]
Then the API is not the same as in BSocket anymore.

And? There needs to be a way to enable the extra functionality. Why should a completely independent class like BNetworkAddress suffer for this?

I don't see any problem with having to use a different constructor (or use an extra method) to enable extra features.

I'm just not fond of the HostName() method not having a clear result, and implicitly sneaking in functionality through it in another class, if a host name was actually given.

But please leave BNetworkAddress as it is, er... was :-)
Does that include the already existing HostName() method returning an empty 
string? :o)

No, I would then just remove that method. Apparently I was undecided about the issue when I wrote that class :-)

BTW Qt's QHostAddress is very similar to our version, while Java's InetSocketAddress does have a getHostName() method (as well as a getHostString() method that will also return the literal host string if there was no name given, which improves on the unclear HostName() method results). So it's not like other people don't agree with you and Mark.
I think both are valid, I just prefer our previous solution.

Bye,
   Axel.


Other related posts: