[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fork() and socketpair()



Joerg Seebohn:

> A call to socketpair should work also for internet protocols,
> but you must use the TCP protocol for SOCK_STREAM sockets:
>    #include <netinet/in.h>     // defines IPPROTO_TCP
>    int  sv[2] ;
>    int  r = socketpair( PF_INET, SOCK_STREAM, IPPROTO_TCP, sv) ;
>
> The unix protocol family "PF_UNIX" works only under UNIX as the name
> says and only for local communication but it is faster than "PF_INET" !

Exactly the information I needed!
Thanx Joerg!

Francesco Orsenigo,
Xarvh Project