summaryrefslogtreecommitdiffstats
path: root/docs/nspr/reference/pr_available64.rst
blob: 7ee2dd07a7fc65dd1ec80bf90f3a6d867041d6fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
PR_Available64
==============

Determines the number of bytes (expressed as a 32-bit integer) that are
available for reading beyond the current read-write pointer in a
specified file or socket.


Syntax
------

.. code::

   #include <prio.h>

   PRInt64 PR_Available64(PRFileDesc *fd);


Parameter
~~~~~~~~~

The function has the following parameter:

``fd``
   Pointer to a :ref:`PRFileDesc` object representing a file or socket.


Returns
~~~~~~~

The function returns one of the following values:

-  If the function completes successfully, it returns the number of
   bytes that are available for reading. For a normal file, these are
   the bytes beyond the current file pointer.
-  If the function fails, it returns the value -1. The error code can
   then be retrieved via :ref:`PR_GetError`.


Description
-----------

:ref:`PR_Available64` works on normal files and sockets. :ref:`PR_Available`
does not work with pipes on Win32 platforms.


See Also
--------

If the number of bytes available for reading is within the range of a
32-bit integer, use :ref:`PR_Available`.