pr_getdesctype.rst (1096B)
1 PR_GetDescType 2 ============== 3 4 Describes what type of file is referenced by a specified file 5 descriptor. 6 7 8 Syntax 9 ------ 10 11 .. code:: 12 13 #include <prio.h> 14 15 PRDescType PR_GetDescType(PRFileDesc *file); 16 17 18 Parameter 19 ~~~~~~~~~ 20 21 The function has the following parameter: 22 23 ``file`` 24 A pointer to a :ref:`PRFileDesc` object whose descriptor type is to be 25 returned. 26 27 28 Returns 29 ~~~~~~~ 30 31 The function returns a ``PRDescType`` enumeration constant that 32 describes the type of file. 33 34 35 Description 36 ----------- 37 38 The ``PRDescType`` enumeration is defined as follows: 39 40 .. code:: 41 42 typedef enum PRDescType { 43 PR_DESC_FILE = 1, 44 PR_DESC_SOCKET_TCP = 2, 45 PR_DESC_SOCKET_UDP = 3, 46 PR_DESC_LAYERED = 4 47 } PRDescType; 48 49 The enumeration has the following enumerators: 50 51 ``PR_DESC_FILE`` 52 The :ref:`PRFileDesc` object represents a normal file. 53 ``PR_DESC_SOCKET_TCP`` 54 The :ref:`PRFileDesc` object represents a TCP socket. 55 ``PR_DESC_SOCKET_UDP`` 56 The :ref:`PRFileDesc` object represents a UDP socket. 57 ``PR_DESC_LAYERED`` 58 The :ref:`PRFileDesc` object is a layered file descriptor.