From df7881f07f53b041dc0568be8528e9dbb74994cc Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Wed, 17 Dec 2008 18:04:49 -0800 Subject: Code drop from //branches/cupcake/...@124589 --- sockets.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sockets.h') diff --git a/sockets.h b/sockets.h index c1f6d80..f336ada 100644 --- a/sockets.h +++ b/sockets.h @@ -52,6 +52,15 @@ int socket_init( void ); int socket_get_type(int fd); +/* this call creates a pair of non-blocking sockets connected + * to each other. this is equivalent to calling the Unix function: + * socketpair(AF_LOCAL,SOCK_STREAM,0,&fds) + * + * on Windows, this will use a pair of TCP loopback sockets instead + * returns 0 on success, -1 on error. + */ +int socket_pair(int *fd1, int *fd2); + /* set SO_REUSEADDR on Unix, SO_EXCLUSIVEADDR on Windows */ int socket_set_xreuseaddr(int fd); int socket_set_nonblock(int fd); -- cgit v1.1