tor-browser

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

pr_queuejob_connect.rst (981B)


      1 PR_QueueJob_Connect
      2 ===================
      3 
      4 Causes a job to be queued when a socket can be connected.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <prtpool.h>
     13 
     14   NSPR_API(PRJob *)
     15   PR_QueueJob_Connect(
     16     PRThreadPool *tpool,
     17     PRJobIoDesc *iod,
     18     const PRNetAddr *addr,
     19     PRJobFn fn,
     20     void * arg,
     21     PRBool joinable
     22   );
     23 
     24 
     25 Parameters
     26 ~~~~~~~~~~
     27 
     28 The function has the following parameters:
     29 
     30 ``tpool``
     31   A pointer to a :ref:`PRThreadPool` structure previously created by a
     32   call to :ref:`PR_CreateThreadPool`.
     33 ``iod``
     34   A pointer to a :ref:`PRJobIoDesc` structure.
     35 ``addr``
     36   Pointer to a :ref:`PRNetAddr` structure for the socket being connected.
     37 ``fn``
     38   The function to be executed when the job is executed.
     39 ``arg``
     40   A pointer to an argument passed to ``fn``.
     41 ``joinable``
     42   If ``PR_TRUE``, the job is joinable. If ``PR_FALSE``, the job is not
     43   joinable. See :ref:`PR_JoinJob`.
     44 
     45 
     46 Returns
     47 ~~~~~~~
     48 
     49 Pointer to a :ref:`PRJob` structure or ``NULL`` on error.