3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>pth_accept</title>
9 <h1 align=center>pth_accept</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#AUTHOR">AUTHOR</a><br>
14 <a href="#LICENSE">LICENSE</a><br>
15 <a href="#VERSION">VERSION</a><br>
16 <a href="#SEE ALSO">SEE ALSO</a><br>
19 <!-- Creator : groff version 1.17.2 -->
20 <!-- CreationDate: Fri Aug 30 16:16:40 2002 -->
23 <table width="100%" border=0 rules="none" frame="void"
24 cols="2" cellspacing="0" cellpadding="0">
25 <tr valign="top" align="left">
26 <td width="10%"></td><td width="90%">
27 pth_accept, pth_connect, pth_read, pth_write, pth_sleep, pth_millisleep, pth_nanosleep, pth_timeout - pseudothread system calls</td></table>
28 <a name="SYNOPSIS"></a>
31 <table width="100%" border=0 rules="none" frame="void"
32 cols="2" cellspacing="0" cellpadding="0">
33 <tr valign="top" align="left">
34 <td width="10%"></td><td width="90%">
35 <pre><b>#include <pthr_pseudothread.h>
37 int pth_accept (pseudothread, int, struct sockaddr *, int *);
38 int pth_connect (pseudothread, int, struct sockaddr *, int);
39 ssize_t pth_read (pseudothread, int, void *, size_t);
40 ssize_t pth_write (pseudothread, int, const void *, size_t);
41 int pth_sleep (pseudothread, int seconds);
42 int pth_millisleep (pseudothread, int millis);
43 int pth_nanosleep (pseudothread, const struct timespec *req, struct timespec *rem);
44 void pth_timeout (pseudothread, int seconds);
45 </b></pre></td></table>
46 <a name="DESCRIPTION"></a>
49 <table width="100%" border=0 rules="none" frame="void"
50 cols="2" cellspacing="0" cellpadding="0">
51 <tr valign="top" align="left">
52 <td width="10%"></td><td width="90%">
53 <b>pth_accept</b>, <b>pth_connect</b>, <b>pth_read</b>,
54 <b>pth_write</b>, <b>pth_sleep</b> and <b>pth_nanosleep</b>
55 behave just like the corresponding system calls. However
56 these calls handle non-blocking sockets and cause the thread
57 to sleep on the reactor if it would block. For general I/O
58 you will probably wish to wrap up your sockets in I/O handle
59 objects, which give you a higher-level buffered interface to
60 sockets (see <b>io_fdopen(3)</b>).</td></table>
62 <table width="100%" border=0 rules="none" frame="void"
63 cols="2" cellspacing="0" cellpadding="0">
64 <tr valign="top" align="left">
65 <td width="10%"></td><td width="90%">
66 <b>pth_millisleep</b> sleeps for a given number of
67 milliseconds.</td></table>
69 <table width="100%" border=0 rules="none" frame="void"
70 cols="2" cellspacing="0" cellpadding="0">
71 <tr valign="top" align="left">
72 <td width="10%"></td><td width="90%">
73 <b>pth_timeout</b> is similar to the <b>alarm(2)</b> system
74 call: it registers a timeout (in seconds). The thread will
75 exit automatically (even in the middle of a system call) if
76 the timeout is reached. To reset the timeout, call
77 <b>pth_timeout</b> with a timeout of 0.</td></table>
81 <table width="100%" border=0 rules="none" frame="void"
82 cols="2" cellspacing="0" cellpadding="0">
83 <tr valign="top" align="left">
84 <td width="10%"></td><td width="90%">
85 Richard Jones <rich@annexia.org></td></table>
86 <a name="LICENSE"></a>
89 <table width="100%" border=0 rules="none" frame="void"
90 cols="2" cellspacing="0" cellpadding="0">
91 <tr valign="top" align="left">
92 <td width="10%"></td><td width="90%">
93 GNU LGPL (see http://www.gnu.org/)</td></table>
94 <a name="VERSION"></a>
97 <table width="100%" border=0 rules="none" frame="void"
98 cols="2" cellspacing="0" cellpadding="0">
99 <tr valign="top" align="left">
100 <td width="10%"></td><td width="90%">
101 pthrlib-3.0.3</td></table>
102 <a name="SEE ALSO"></a>
105 <table width="100%" border=0 rules="none" frame="void"
106 cols="2" cellspacing="0" cellpadding="0">
107 <tr valign="top" align="left">
108 <td width="10%"></td><td width="90%">
109 <b>pth_poll(3)</b>, <b>pth_select(3)</b>.</td></table>