summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>1999-03-30 01:36:34 +0000
committerwtc%netscape.com <devnull@localhost>1999-03-30 01:36:34 +0000
commite4f0e27c9cdccf31f60d0c17556ba512cceefeb7 (patch)
treea7de92934d7977f45985d1278221e93f2c9c3658
parent2273f4f96a5407f95c288c54faaee3bd555a0a17 (diff)
downloadnspr-hg-e4f0e27c9cdccf31f60d0c17556ba512cceefeb7.tar.gz
Two new functions defined to enable polling native and NSPR FDs simultaneously.
-rw-r--r--pr/include/prio.h41
1 files changed, 40 insertions, 1 deletions
diff --git a/pr/include/prio.h b/pr/include/prio.h
index b8fcad7d..1cb39852 100644
--- a/pr/include/prio.h
+++ b/pr/include/prio.h
@@ -277,7 +277,8 @@ typedef enum PRDescType
PR_DESC_FILE = 1,
PR_DESC_SOCKET_TCP = 2,
PR_DESC_SOCKET_UDP = 3,
- PR_DESC_LAYERED = 4
+ PR_DESC_LAYERED = 4,
+ PR_DESC_SOCKET_POLL = 5
} PRDescType;
typedef enum PRSeekWhence {
@@ -1078,6 +1079,44 @@ PR_EXTERN(PRFileDesc*) PR_NewTCPSocket(void);
/*
*************************************************************************
+ * FUNCTION: PR_CreateSocketPollFd
+ * DESCRIPTION:
+ * Create a PRFileDesc wrapper for a native socket handle, for use with
+ * PR_Poll only
+ * INPUTS:
+ * None
+ * OUTPUTS:
+ * None
+ * RETURN: PRFileDesc*
+ * Upon successful completion, PR_CreateSocketPollFd returns a pointer
+ * to the PRFileDesc created for the native socket handle
+ * Returns a NULL pointer if the create of a new PRFileDesc failed
+ *
+ **************************************************************************
+ */
+
+PR_EXTERN(PRFileDesc*) PR_CreateSocketPollFd(PRInt32 osfd);
+
+/*
+ *************************************************************************
+ * FUNCTION: PR_DestroySocketPollFd
+ * DESCRIPTION:
+ * Destroy the PRFileDesc wrapper created by PR_CreateSocketPollFd
+ * INPUTS:
+ * None
+ * OUTPUTS:
+ * None
+ * RETURN: PRFileDesc*
+ * Upon successful completion, PR_DestroySocketPollFd returns
+ * PR_SUCCESS, else PR_FAILURE
+ *
+ **************************************************************************
+ */
+
+PR_EXTERN(PRStatus) PR_DestroySocketPollFd(PRFileDesc *fd);
+
+/*
+ *************************************************************************
* FUNCTION: PR_Connect
* DESCRIPTION:
* Initiate a connection on a socket.