Go to the FreeLists Home Page Home Signup Help Login
 



[openbeosnetteam] || [Date Prev] [09-2005 Date Index] [Date Next] || [Thread Prev] [09-2005 Thread Index] [Thread Next]

[openbeosnetteam] Re: socketpair() implementation

  • From: Philippe Houdoin <philippe.houdoin@xxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Thu, 22 Sep 2005 16:58:49 +0200
Hi Jerome and teammates ;-)

> Please have a look at http://www.haiku-os.org/bugzilla/show_bug.cgi?id=52 to
> give feedback or comments. socketpair() isn't on BeOS, but it's kind of
> expected to be here IMO.

Well, as it's missing for POSIX 1003.1 compliance, I guess supporting it will be
great. Not mandatory for R1, thought, but it's not like it's that hard to
implement.

> I added a socketpair() prototype in our header sys/socket.h.

I saw this, yes.

> My opinion about implementation would be to have a socketpair() in
> src/kits/network/libsocket/socket.c which does (for AF_INET at least):
> - calls socket() twice to have two sockets.
> - call a new ioctl to have the network stack do the socketpair hard job :
> bind(), listen(), connect(), accept()
> - close the listening socket.

Sounds good to me, indeed.
BTW, these sockets are supposed to be unbounded.

> As I never tested the Haiku network part, maybe I'm not the right person to
> code this.

Then just implement a noop socketpair() in socket.c (both in libsocket and in
libnet variant) and I'll self assign the task to implement it later.

I don't consider this as urgent as reaching beta stage of OpenGL Kit and the
network stack missing features: DHCP, 802.11 support.
Maybe that's because I never used socketpair() so far ;-)

- Philippe





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.