[SDL] SDL_net and socketpair

Francesco Orsenigo xarvh at lombardiacom.it
Thu Sep 5 09:38:00 PDT 2002

Neil Griffiths:
> I'll give you neater, but that's your only valid point. You don't
> create sockets with listen, accept or connect, you'd have to use
> socket() first anyway. Which is the same as socketpair(), except you
> use a function call for each socket instead of one function that
> returns two. So your point about it being more complex is marginal and
> it's no more likely to fail. And it won't take several seconds longer
> unless your compiler is worse than useless and takes that long to call
> a function. ;)
Ehm, socketpair() creates a pair of INTERCONNECTED sockets.

> Even when using socketpair(), you still have to use listen, accept and
> connect
I can socketpair(), fork() and then send() and recv() data back and forth 
between parent and child.
Without any call to listen(), accept() or connect().

If you are saying that is possible to call socket() twice and then connect 
somehow the two created sockets, tell me how (i'm new with network 
programming) because it should do exactly what i need.

Francesco Orsenigo, Xarvh Project

More information about the SDL mailing list