Phobos sockets
Bill Baxter
dnewsgroup at billbaxter.com
Fri Nov 16 20:10:44 PST 2007
Martin Hess wrote:
> I'm trying to figure which socket API to use in Phobos. There appears to
> be 3 choices for linux:
>
> 1) A general version: std.socket
>
> 2) A linux version: std.c.linux.socket
> - this one gets a version assert on X86_64
>
> 3) The last isn't really a socket class but it has the socket calls:
> std.c.unix.unix. It is used by version #1 above.
>
> Version #2 redeclares the c socket api that is declared in #3
>
> Are all 3 versions considered public?
>
> Is #2 really just for X86, or should it also work with any Unix/BSD
> socket implementation?
>
> Which one is best tested? Which of course leads to the question is there
> any kind of test suite for Phobos?
All the std.c.* packages are just ports of the C header files to let you
link with native C standard library functions. I've never used sockets
in D, so I don't know for sure, but I'd guess 1) is the one you should
be using since it was made specifically for D.
--bb
More information about the Digitalmars-d
mailing list