[TUHS] If not Linux, then what?

Larry McVoy lm at mcvoy.com
Wed Aug 28 11:46:40 AEST 2019


On Tue, Aug 27, 2019 at 09:21:43PM -0400, Arthur Krewat wrote:
> In re: the socket() thing...
> 
> I remember getting into something (forget what) back in the early 90's,
> writing something (again, I forget what) and realizing what I needed to do
> to open a socket to a remote endpoint.
> 
> I remember thinking "wait, I can't just open("hostname:port", O_TCP); ???"

So that part is fine.

> And, horror of all horrors, I need to deal with little/big endian things?
> ntohs(), htons(), et al?

That part is reality.  You can send ascii and then pay the price for parsing
that or you can send binary.

These days, we have CPU cycles to burn so the ascii answer seems fine.  It
is, mostly, it's not when it is tons of small messages that need to be 
processed at millions or billions/sec.  In the past, CPU cycles were 
not a given so lots of stuff was designed to not be parsed.


More information about the TUHS mailing list