-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhttp__compat_8h.html
217 lines (205 loc) · 11.1 KB
/
http__compat_8h.html
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libevent: event2/http_compat.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libevent
 <span id="projectnumber">2.2.1</span>
</div>
<div id="projectbrief">Event notification library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_db160b4728e6067cf5f9cc14ec42c79d.html">event2</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">http_compat.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Potentially non-threadsafe versions of the functions in <a class="el" href="http_8h.html" title="Basic support for HTTP serving.">http.h</a>: provided only for backwards compatibility.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include <event2/event-config.h></code><br />
<code>#include <<a class="el" href="util_8h_source.html">event2/util.h</a>></code><br />
</div>
<p><a href="http__compat_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aae95ca15c179b4b0b8c7bbb7b1da342a"><td class="memItemLeft" align="right" valign="top"><a id="aae95ca15c179b4b0b8c7bbb7b1da342a"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="http__compat_8h.html#aae95ca15c179b4b0b8c7bbb7b1da342a">evhttp_request_uri</a>   <a class="el" href="http_8h.html#aa02d664574b2aefbb671f8534e5c476a">evhttp_request_get_uri</a></td></tr>
<tr class="memdesc:aae95ca15c179b4b0b8c7bbb7b1da342a"><td class="mdescLeft"> </td><td class="mdescRight">Returns the request URI. <br /></td></tr>
<tr class="separator:aae95ca15c179b4b0b8c7bbb7b1da342a"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a2e1ca8b7e6d1cc4ed0e0a2e864496e92"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct evhttp_connection * </td><td class="memItemRight" valign="bottom"><a class="el" href="http__compat_8h.html#a2e1ca8b7e6d1cc4ed0e0a2e864496e92">evhttp_connection_new</a> (const char *address, ev_uint16_t port)</td></tr>
<tr class="memdesc:a2e1ca8b7e6d1cc4ed0e0a2e864496e92"><td class="mdescLeft"> </td><td class="mdescRight">A connection object that can be used to for making HTTP requests. <a href="http__compat_8h.html#a2e1ca8b7e6d1cc4ed0e0a2e864496e92">More...</a><br /></td></tr>
<tr class="separator:a2e1ca8b7e6d1cc4ed0e0a2e864496e92"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a005fff08e18b6ca6689c1226dd9d00fb"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL void </td><td class="memItemRight" valign="bottom"><a class="el" href="http__compat_8h.html#a005fff08e18b6ca6689c1226dd9d00fb">evhttp_connection_set_base</a> (struct evhttp_connection *evcon, struct <a class="el" href="structevent__base.html">event_base</a> *base)</td></tr>
<tr class="memdesc:a005fff08e18b6ca6689c1226dd9d00fb"><td class="mdescLeft"> </td><td class="mdescRight">Associates an event base with the connection - can only be called on a freshly created connection object that has not been used yet. <a href="http__compat_8h.html#a005fff08e18b6ca6689c1226dd9d00fb">More...</a><br /></td></tr>
<tr class="separator:a005fff08e18b6ca6689c1226dd9d00fb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae6e4bd50d3da5bdac6457ffc03f4db06"><td class="memItemLeft" align="right" valign="top">EVENT2_EXPORT_SYMBOL struct evhttp * </td><td class="memItemRight" valign="bottom"><a class="el" href="http__compat_8h.html#ae6e4bd50d3da5bdac6457ffc03f4db06">evhttp_start</a> (const char *address, ev_uint16_t port)</td></tr>
<tr class="memdesc:ae6e4bd50d3da5bdac6457ffc03f4db06"><td class="mdescLeft"> </td><td class="mdescRight">Start an HTTP server on the specified address and port. <a href="http__compat_8h.html#ae6e4bd50d3da5bdac6457ffc03f4db06">More...</a><br /></td></tr>
<tr class="separator:ae6e4bd50d3da5bdac6457ffc03f4db06"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Potentially non-threadsafe versions of the functions in <a class="el" href="http_8h.html" title="Basic support for HTTP serving.">http.h</a>: provided only for backwards compatibility. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a2e1ca8b7e6d1cc4ed0e0a2e864496e92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e1ca8b7e6d1cc4ed0e0a2e864496e92">◆ </a></span>evhttp_connection_new()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL struct evhttp_connection* evhttp_connection_new </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ev_uint16_t </td>
<td class="paramname"><em>port</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>A connection object that can be used to for making HTTP requests. </p>
<p>The connection object tries to establish the connection when it is given an http request object.</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000041">Deprecated:</a></b></dt><dd>It does not allow an event base to be specified </dd></dl>
</div>
</div>
<a id="a005fff08e18b6ca6689c1226dd9d00fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a005fff08e18b6ca6689c1226dd9d00fb">◆ </a></span>evhttp_connection_set_base()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL void evhttp_connection_set_base </td>
<td>(</td>
<td class="paramtype">struct evhttp_connection * </td>
<td class="paramname"><em>evcon</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structevent__base.html">event_base</a> * </td>
<td class="paramname"><em>base</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Associates an event base with the connection - can only be called on a freshly created connection object that has not been used yet. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000042">Deprecated:</a></b></dt><dd>XXXX Why? </dd></dl>
</div>
</div>
<a id="ae6e4bd50d3da5bdac6457ffc03f4db06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6e4bd50d3da5bdac6457ffc03f4db06">◆ </a></span>evhttp_start()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">EVENT2_EXPORT_SYMBOL struct evhttp* evhttp_start </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ev_uint16_t </td>
<td class="paramname"><em>port</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Start an HTTP server on the specified address and port. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000040">Deprecated:</a></b></dt><dd>It does not allow an event base to be specified</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">address</td><td>the address to which the HTTP server should be bound </td></tr>
<tr><td class="paramname">port</td><td>the port number on which the HTTP server should listen </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to a newly initialized evhttp server structure or NULL on error </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>