[haiku-development] Re: Sockets

  • From: Donn Cave <donn@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 29 Aug 2014 23:25:32 -0700 (PDT)

quoth Sean Healy,

> Actually, I was always thought this was one of the areas where BeOS got it  
> conceptually right. They are different beasts, and in principle should be  
> treated differently, despite BSD design decisions.
> 
> But doing it this way makes porting posix apps easier, so it's  
> conceptually inelegant but quite convenient.

Really it is as conceptually elegant as it is convenient.  Don't be
thrown off by the word "file".  Through that file descriptor ID,
UNIX provides an abstraction that covers all kinds of device I/O
and provides a baseline of common functionality.

In Haiku, message ports are the left-out I/O devices.  But there's
an undocumented function that supports blocking for incoming data on
a mixed set of ports and file descriptors - replacing select/poll -
which I expect is all anyone would need.

        Donn

Other related posts: