On Dec 4, 2007 12:11 PM, Matthew Gregan <[EMAIL PROTECTED]> wrote: > > Note that dumb_socketpair is _not_ actually cross-platform; it has the > > same #ifdef WIN32 style that netxx_pipe.cc currently has, and the WIN32 > > version has an extra parameter that is important. Apparently 'socketpair' > > is implemented on some/most "unix" platforms, but not on Win32? > > Right, that code is an implementation of socketpair() for Windows because it > is not provided by the Windows socket API. Cross platform refers to the > rest of the code--all platforms can use socketpair() and almost all of the > rest of the code can be shared between platforms (except for process > creation, but we probably already have sufficient wrappers for these in the > $platform/ directories already).
There is one wrinkle - if I understand that code correctly, it's necessary to call closesocket() instead of close() on the fds returned from that socketpair implementation. I guess we could just #define closesocket(n) close(n) on Unix... zw _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel