⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apr__poll_8h-source.html

📁 apr函数库使用手册
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Apache Portable Runtime: apr_poll.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.7 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>apr_poll.h</h1><a href="apr__poll_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as</span>
00002 <span class="comment"> * applicable.</span>
00003 <span class="comment"> *</span>
00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
00006 <span class="comment"> * You may obtain a copy of the License at</span>
00007 <span class="comment"> *</span>
00008 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
00009 <span class="comment"> *</span>
00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
00014 <span class="comment"> * limitations under the License.</span>
00015 <span class="comment"> */</span>
00016 
00017 <span class="preprocessor">#ifndef APR_POLL_H</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define APR_POLL_H</span>
00019 <span class="preprocessor"></span><span class="comment">/**</span>
00020 <span class="comment"> * @file apr_poll.h</span>
00021 <span class="comment"> * @brief APR Poll interface</span>
00022 <span class="comment"> */</span>
00023 <span class="preprocessor">#include "apr.h"</span>
00024 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span>
00025 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
00026 <span class="preprocessor">#include "<a class="code" href="apr__inherit_8h.html">apr_inherit.h</a>"</span> 
00027 <span class="preprocessor">#include "<a class="code" href="apr__file__io_8h.html">apr_file_io.h</a>"</span> 
00028 <span class="preprocessor">#include "<a class="code" href="apr__network__io_8h.html">apr_network_io.h</a>"</span> 
00029 
00030 <span class="preprocessor">#if APR_HAVE_NETINET_IN_H</span>
00031 <span class="preprocessor"></span><span class="preprocessor">#include &lt;netinet/in.h&gt;</span>
00032 <span class="preprocessor">#endif</span>
00033 <span class="preprocessor"></span>
00034 <span class="preprocessor">#ifdef __cplusplus</span>
00035 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
00036 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
00037 <span class="comment"></span>
00038 <span class="comment">/**</span>
00039 <span class="comment"> * @defgroup apr_poll Poll Routines</span>
00040 <span class="comment"> * @ingroup APR </span>
00041 <span class="comment"> * @{</span>
00042 <span class="comment"> */</span>
00043 <span class="comment"></span>
00044 <span class="comment">/**</span>
00045 <span class="comment"> * Poll options</span>
00046 <span class="comment"> */</span>
<a name="l00047"></a><a class="code" href="group__apr__poll.html#ga8">00047</a> <span class="preprocessor">#define APR_POLLIN    0x001     </span><span class="comment">/**&lt; Can read without blocking */</span>
<a name="l00048"></a><a class="code" href="group__apr__poll.html#ga9">00048</a> <span class="preprocessor">#define APR_POLLPRI   0x002     </span><span class="comment">/**&lt; Priority data available */</span>
<a name="l00049"></a><a class="code" href="group__apr__poll.html#ga10">00049</a> <span class="preprocessor">#define APR_POLLOUT   0x004     </span><span class="comment">/**&lt; Can write without blocking */</span>
<a name="l00050"></a><a class="code" href="group__apr__poll.html#ga11">00050</a> <span class="preprocessor">#define APR_POLLERR   0x010     </span><span class="comment">/**&lt; Pending error */</span>
<a name="l00051"></a><a class="code" href="group__apr__poll.html#ga12">00051</a> <span class="preprocessor">#define APR_POLLHUP   0x020     </span><span class="comment">/**&lt; Hangup occurred */</span>
<a name="l00052"></a><a class="code" href="group__apr__poll.html#ga13">00052</a> <span class="preprocessor">#define APR_POLLNVAL  0x040     </span><span class="comment">/**&lt; Descriptior invalid */</span>
00053 <span class="comment"></span>
00054 <span class="comment">/**</span>
00055 <span class="comment"> * Pollset Flags</span>
00056 <span class="comment"> */</span>
<a name="l00057"></a><a class="code" href="group__apr__poll.html#ga14">00057</a> <span class="preprocessor">#define APR_POLLSET_THREADSAFE 0x001 </span><span class="comment">/**&lt; Adding or Removing a Descriptor is thread safe */</span>
00058 <span class="comment"></span>
00059 <span class="comment">/** Used in apr_pollfd_t to determine what the apr_descriptor is */</span>
<a name="l00060"></a><a class="code" href="group__apr__poll.html#ga15">00060</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> { 
00061     <a class="code" href="group__apr__poll.html#gga15a9">APR_NO_DESC</a>,                <span class="comment">/**&lt; nothing here */</span>
00062     <a class="code" href="group__apr__poll.html#gga15a10">APR_POLL_SOCKET</a>,            <span class="comment">/**&lt; descriptor refers to a socket */</span>
00063     <a class="code" href="group__apr__poll.html#gga15a11">APR_POLL_FILE</a>,              <span class="comment">/**&lt; descriptor refers to a file */</span>
00064     <a class="code" href="group__apr__poll.html#gga15a12">APR_POLL_LASTDESC</a>           <span class="comment">/**&lt; descriptor is the last one in the list */</span>
00065 } <a class="code" href="group__apr__poll.html#ga15">apr_datatype_e</a> ;
00066 <span class="comment"></span>
00067 <span class="comment">/** Union of either an APR file or socket. */</span>
<a name="l00068"></a><a class="code" href="unionapr__descriptor.html">00068</a> <span class="keyword">typedef</span> <span class="keyword">union </span>{
<a name="l00069"></a><a class="code" href="unionapr__descriptor.html#o0">00069</a>     <a class="code" href="group__apr__file__io.html#ga2">apr_file_t</a> *f;              <span class="comment">/**&lt; file */</span>
<a name="l00070"></a><a class="code" href="unionapr__descriptor.html#o1">00070</a>     <a class="code" href="group__apr__network__io.html#ga0">apr_socket_t</a> *s;            <span class="comment">/**&lt; socket */</span>
00071 } <a class="code" href="unionapr__descriptor.html">apr_descriptor</a>;
00072 <span class="comment"></span>
00073 <span class="comment">/** @see apr_pollfd_t */</span>
<a name="l00074"></a><a class="code" href="group__apr__poll.html#ga0">00074</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapr__pollfd__t.html">apr_pollfd_t</a> <a class="code" href="group__apr__poll.html#ga0">apr_pollfd_t</a>;
00075 <span class="comment"></span>
00076 <span class="comment">/** Poll descriptor set. */</span>
<a name="l00077"></a><a class="code" href="structapr__pollfd__t.html">00077</a> <span class="keyword">struct </span><a class="code" href="group__apr__poll.html#ga0">apr_pollfd_t</a> {
<a name="l00078"></a><a class="code" href="structapr__pollfd__t.html#o0">00078</a>     <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *<a class="code" href="structapr__pollfd__t.html#o0">p</a>;              <span class="comment">/**&lt; associated pool */</span>
<a name="l00079"></a><a class="code" href="structapr__pollfd__t.html#o1">00079</a>     <a class="code" href="group__apr__poll.html#ga15">apr_datatype_e</a> <a class="code" href="structapr__pollfd__t.html#o1">desc_type</a>;   <span class="comment">/**&lt; descriptor type */</span>
<a name="l00080"></a><a class="code" href="structapr__pollfd__t.html#o2">00080</a>     apr_int16_t <a class="code" href="structapr__pollfd__t.html#o2">reqevents</a>;      <span class="comment">/**&lt; requested events */</span>
<a name="l00081"></a><a class="code" href="structapr__pollfd__t.html#o3">00081</a>     apr_int16_t <a class="code" href="structapr__pollfd__t.html#o3">rtnevents</a>;      <span class="comment">/**&lt; returned events */</span>
<a name="l00082"></a><a class="code" href="structapr__pollfd__t.html#o4">00082</a>     <a class="code" href="unionapr__descriptor.html">apr_descriptor</a> <a class="code" href="structapr__pollfd__t.html#o4">desc</a>;        <span class="comment">/**&lt; @see apr_descriptor */</span>
<a name="l00083"></a><a class="code" href="structapr__pollfd__t.html#o5">00083</a>     <span class="keywordtype">void</span> *<a class="code" href="structapr__pollfd__t.html#o5">client_data</a>;          <span class="comment">/**&lt; allows app to associate context */</span>
00084 };
00085 
00086 
00087 <span class="comment">/* General-purpose poll API for arbitrarily large numbers of</span>
00088 <span class="comment"> * file descriptors</span>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -