tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pr_createiolayerstub.rst (888B)


      1 PR_CreateIOLayerStub
      2 ====================
      3 
      4 Creates a new layer.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <prio.h>
     13 
     14   PRFileDesc* PR_CreateIOLayerStub(
     15     PRDescIdentity ident
     16     PRIOMethods const *methods);
     17 
     18 
     19 Parameters
     20 ~~~~~~~~~~
     21 
     22 The function has the following parameters:
     23 
     24 ``ident``
     25   The identity to be associated with the new layer.
     26 ``methods``
     27   A pointer to the :ref:`PRIOMethods` structure specifying the functions
     28   for the new layer.
     29 
     30 
     31 Returns
     32 ~~~~~~~
     33 
     34 A new file descriptor for the specified layer.
     35 
     36 
     37 Description
     38 -----------
     39 
     40 A new layer may be allocated by calling :ref:`PR_CreateIOLayerStub`. The
     41 file descriptor returned contains the pointer to the I/O methods table
     42 provided. The runtime neither modifies the table nor tests its
     43 correctness.
     44 
     45 The caller should override appropriate contents of the file descriptor
     46 returned before pushing it onto the protocol stack.