forked from userver-framework/userver-framework.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasscomponents_1_1Server.html
457 lines (449 loc) · 33.9 KB
/
classcomponents_1_1Server.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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta property="og:image" content="../../logo_in_circle.png"/>
<meta property="og:image:alt" content="userver logo"/>
<link rel="icon" href="../../favicon.svg">
<title>userver: components::Server Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<link rel="stylesheet" href="../../doxygen-like.css">
<script src="../../highlight.pack.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" />
<link href="../../customdoxygen.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" style="width: 100%;">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><a id='logo-anchor' href="../../index.html"><img alt="Logo" src="../../logo.svg"/></a></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname"><a class="titlelink" href="../../index.html">userver
</a>
</div>
<div id="projectbrief"><a class="titlelink" href="../../index.html">C++ Async Framework (beta)</a></div>
</td>
<td style="float: right; padding-right: 15px; padding-top: 15px;">
<a href="https://github.com/userver-framework/" rel="noopener" target="_blank" class="titlelink">
<img src="../../github_logo.svg" style="filter: invert(100%);" alt="Github"/>
</a>
<a href="https://t.me/userver_en" rel="noopener" id='telegram_channel' target="_blank" class="titlelink">
<img src="../../telegram_logo.svg" alt="Telegram"/>
</a>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="../../d0/d1f/namespacecomponents.html">components</a></li><li class="navelem"><a class="el" href="../../d0/d0b/classcomponents_1_1Server.html">Server</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pub-static-attribs">Static Public Attributes</a> |
<a href="../../df/d8b/classcomponents_1_1Server-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">components::Server Class Reference<span class="mlabels"><span class="mlabel">final</span></span><div class="ingroups"><a class="el" href="../../dd/d1c/group__userver__components.html">Components</a></div></div></div>
</div><!--header-->
<div class="contents">
<p>Component that listens for incomming requests, manages incomming connections and passes the requests to the appropriate handler.
<a href="../../d0/d0b/classcomponents_1_1Server.html#details">More...</a></p>
<p><code>#include <<a class="el" href="../../d3/ddd/core_2include_2userver_2server_2component_8hpp_source.html">userver/server/component.hpp</a>></code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Inheritance diagram for components::Server:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d2/db6/classcomponents_1_1Server__inherit__graph.png" border="0" usemap="#acomponents_1_1Server_inherit__map" alt="Inheritance graph"/></div>
<map name="acomponents_1_1Server_inherit__map" id="acomponents_1_1Server_inherit__map">
<area shape="rect" title="Component that listens for incomming requests, manages incomming connections and passes the requests ..." alt="" coords="67,152,219,177"/>
<area shape="rect" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html" title="Base class for all application components, it depends on components::Logger and components::Tracer." alt="" coords="5,79,281,104"/>
<area shape="rect" title=" " alt="" coords="16,5,271,31"/>
</map>
<center><span class="legend">[<a href="../../graph_legend.html">legend</a>]</span></center></div>
<div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Collaboration diagram for components::Server:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="../../d5/dc7/classcomponents_1_1Server__coll__graph.png" border="0" usemap="#acomponents_1_1Server_coll__map" alt="Collaboration graph"/></div>
<map name="acomponents_1_1Server_coll__map" id="acomponents_1_1Server_coll__map">
<area shape="rect" title="Component that listens for incomming requests, manages incomming connections and passes the requests ..." alt="" coords="179,183,331,208"/>
<area shape="rect" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html" title="Base class for all application components, it depends on components::Logger and components::Tracer." alt="" coords="5,95,281,120"/>
<area shape="rect" title=" " alt="" coords="13,13,268,38"/>
<area shape="rect" title=" " alt="" coords="310,95,435,120"/>
<area shape="rect" title=" " alt="" coords="292,5,459,45"/>
</map>
<center><span class="legend">[<a href="../../graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae9afd2e99d92be49e713c54170edcd8e"><td class="memItemLeft" align="right" valign="top"><a id="ae9afd2e99d92be49e713c54170edcd8e" name="ae9afd2e99d92be49e713c54170edcd8e"></a>
 </td><td class="memItemRight" valign="bottom"><b>Server</b> (const <a class="el" href="../../db/dff/classcomponents_1_1ComponentConfig.html">components::ComponentConfig</a> &component_config, const <a class="el" href="../../da/db1/classcomponents_1_1ComponentContext.html">components::ComponentContext</a> &component_context)</td></tr>
<tr class="separator:ae9afd2e99d92be49e713c54170edcd8e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3729deb39a876f7030f21ec76390ce93"><td class="memItemLeft" align="right" valign="top"><a id="a3729deb39a876f7030f21ec76390ce93" name="a3729deb39a876f7030f21ec76390ce93"></a>
void </td><td class="memItemRight" valign="bottom"><b>OnAllComponentsLoaded</b> () override</td></tr>
<tr class="separator:a3729deb39a876f7030f21ec76390ce93"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6fb9bddd9811fd20819fa63c3d267f3c"><td class="memItemLeft" align="right" valign="top"><a id="a6fb9bddd9811fd20819fa63c3d267f3c" name="a6fb9bddd9811fd20819fa63c3d267f3c"></a>
void </td><td class="memItemRight" valign="bottom"><b>OnAllComponentsAreStopping</b> () override</td></tr>
<tr class="separator:a6fb9bddd9811fd20819fa63c3d267f3c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af1bcc5446f34e79b0318a8f07ece9a94"><td class="memItemLeft" align="right" valign="top"><a id="af1bcc5446f34e79b0318a8f07ece9a94" name="af1bcc5446f34e79b0318a8f07ece9a94"></a>
const <a class="el" href="../../d0/d68/classserver_1_1Server.html">server::Server</a> & </td><td class="memItemRight" valign="bottom"><b>GetServer</b> () const</td></tr>
<tr class="separator:af1bcc5446f34e79b0318a8f07ece9a94"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2d7177318fb4cdc29b3c92fe3e2cf3c1"><td class="memItemLeft" align="right" valign="top"><a id="a2d7177318fb4cdc29b3c92fe3e2cf3c1" name="a2d7177318fb4cdc29b3c92fe3e2cf3c1"></a>
<a class="el" href="../../d0/d68/classserver_1_1Server.html">server::Server</a> & </td><td class="memItemRight" valign="bottom"><b>GetServer</b> ()</td></tr>
<tr class="separator:a2d7177318fb4cdc29b3c92fe3e2cf3c1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a44c0bdf8efcf82bf3113e9ecd4fdbbe6"><td class="memItemLeft" align="right" valign="top"><a id="a44c0bdf8efcf82bf3113e9ecd4fdbbe6" name="a44c0bdf8efcf82bf3113e9ecd4fdbbe6"></a>
void </td><td class="memItemRight" valign="bottom"><b>AddHandler</b> (const <a class="el" href="../../d6/d36/classserver_1_1handlers_1_1HttpHandlerBase.html">server::handlers::HttpHandlerBase</a> &handler, engine::TaskProcessor &task_processor)</td></tr>
<tr class="separator:a44c0bdf8efcf82bf3113e9ecd4fdbbe6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcomponents_1_1LoggableComponentBase"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcomponents_1_1LoggableComponentBase')"><img src="../../closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html">components::LoggableComponentBase</a></td></tr>
<tr class="memitem:a7b2b853a1b16547cc5e1b8c54f69c376 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memItemLeft" align="right" valign="top"><a id="a7b2b853a1b16547cc5e1b8c54f69c376" name="a7b2b853a1b16547cc5e1b8c54f69c376"></a>
 </td><td class="memItemRight" valign="bottom"><b>LoggableComponentBase</b> (const <a class="el" href="../../db/dff/classcomponents_1_1ComponentConfig.html">ComponentConfig</a> &, const <a class="el" href="../../da/db1/classcomponents_1_1ComponentContext.html">ComponentContext</a> &)</td></tr>
<tr class="separator:a7b2b853a1b16547cc5e1b8c54f69c376 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af8840d7199368a6425d4c4fc87ffe2e9 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memItemLeft" align="right" valign="top"><a id="af8840d7199368a6425d4c4fc87ffe2e9" name="af8840d7199368a6425d4c4fc87ffe2e9"></a>
 </td><td class="memItemRight" valign="bottom"><b>LoggableComponentBase</b> (<a class="el" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html">LoggableComponentBase</a> &&)=delete</td></tr>
<tr class="separator:af8840d7199368a6425d4c4fc87ffe2e9 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a492b43c837c34c90e1ccc4fd8264878f inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memItemLeft" align="right" valign="top"><a id="a492b43c837c34c90e1ccc4fd8264878f" name="a492b43c837c34c90e1ccc4fd8264878f"></a>
 </td><td class="memItemRight" valign="bottom"><b>LoggableComponentBase</b> (const <a class="el" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html">LoggableComponentBase</a> &)=delete</td></tr>
<tr class="separator:a492b43c837c34c90e1ccc4fd8264878f inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9408f7cb9eace1fe8b9b5ff68c901015 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html#a9408f7cb9eace1fe8b9b5ff68c901015">~LoggableComponentBase</a> () override=default</td></tr>
<tr class="separator:a9408f7cb9eace1fe8b9b5ff68c901015 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa5544da96b967a63593cf4900a290000 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d0/d1f/namespacecomponents.html#a7a041524f23130330b0aec16f1e3410f">ComponentHealth</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html#aa5544da96b967a63593cf4900a290000">GetComponentHealth</a> () const override</td></tr>
<tr class="separator:aa5544da96b967a63593cf4900a290000 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad2c5e6609069a774fd8cbe2a622e34b3 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html#ad2c5e6609069a774fd8cbe2a622e34b3">OnLoadingCancelled</a> () override</td></tr>
<tr class="separator:ad2c5e6609069a774fd8cbe2a622e34b3 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acdcabdef99950f3c2abec1ff0069f573 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html#acdcabdef99950f3c2abec1ff0069f573">OnAllComponentsLoaded</a> () override</td></tr>
<tr class="separator:acdcabdef99950f3c2abec1ff0069f573 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5ff153ac78db3fbf3c3689e324e03ad5 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html#a5ff153ac78db3fbf3c3689e324e03ad5">OnAllComponentsAreStopping</a> () override</td></tr>
<tr class="separator:a5ff153ac78db3fbf3c3689e324e03ad5 inherit pub_methods_classcomponents_1_1LoggableComponentBase"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ab42921d47f6746d70028dcdb4b4aad49"><td class="memItemLeft" align="right" valign="top"><a id="ab42921d47f6746d70028dcdb4b4aad49" name="ab42921d47f6746d70028dcdb4b4aad49"></a>
static <a class="el" href="../../d1/d3e/structyaml__config_1_1Schema.html">yaml_config::Schema</a> </td><td class="memItemRight" valign="bottom"><b>GetStaticConfigSchema</b> ()</td></tr>
<tr class="separator:ab42921d47f6746d70028dcdb4b4aad49"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_static_methods_classcomponents_1_1LoggableComponentBase"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classcomponents_1_1LoggableComponentBase')"><img src="../../closed.png" alt="-"/> Static Public Member Functions inherited from <a class="el" href="../../d5/d69/classcomponents_1_1LoggableComponentBase.html">components::LoggableComponentBase</a></td></tr>
<tr class="memitem:a0444cf509b540497db68eb59782ac00c inherit pub_static_methods_classcomponents_1_1LoggableComponentBase"><td class="memItemLeft" align="right" valign="top"><a id="a0444cf509b540497db68eb59782ac00c" name="a0444cf509b540497db68eb59782ac00c"></a>
static <a class="el" href="../../d1/d3e/structyaml__config_1_1Schema.html">yaml_config::Schema</a> </td><td class="memItemRight" valign="bottom"><b>GetStaticConfigSchema</b> ()</td></tr>
<tr class="separator:a0444cf509b540497db68eb59782ac00c inherit pub_static_methods_classcomponents_1_1LoggableComponentBase"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-attribs" name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:ad450b73070784e7e90cd4ebaff19e8c0"><td class="memItemLeft" align="right" valign="top">static constexpr std::string_view </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d0b/classcomponents_1_1Server.html#ad450b73070784e7e90cd4ebaff19e8c0">kName</a> = "server"</td></tr>
<tr class="separator:ad450b73070784e7e90cd4ebaff19e8c0"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Component that listens for incomming requests, manages incomming connections and passes the requests to the appropriate handler. </p>
<p >Starts listening and accepting connections only after <b>all</b> the components are loaded.</p>
<p >All the classes inherited from <a class="el" href="../../d6/d36/classserver_1_1handlers_1_1HttpHandlerBase.html" title="Base class for all the Userver HTTP Handlers.">server::handlers::HttpHandlerBase</a> and registered in components list bind to the <a class="el" href="../../d0/d0b/classcomponents_1_1Server.html" title="Component that listens for incomming requests, manages incomming connections and passes the requests ...">components::Server</a> component.</p>
<h2><a class="anchor" id="autotoc_md569"></a>
Dynamic config</h2>
<ul>
<li><a class="el" href="../../dd/d2c/md_en_schemas_dynamic_configs.html#USERVER_LOG_REQUEST">USERVER_LOG_REQUEST</a></li>
<li><a class="el" href="../../dd/d2c/md_en_schemas_dynamic_configs.html#USERVER_LOG_REQUEST_HEADERS">USERVER_LOG_REQUEST_HEADERS</a></li>
<li><a class="el" href="../../dd/d2c/md_en_schemas_dynamic_configs.html#USERVER_CHECK_AUTH_IN_HANDLERS">USERVER_CHECK_AUTH_IN_HANDLERS</a></li>
<li><a class="el" href="../../dd/d2c/md_en_schemas_dynamic_configs.html#USERVER_CANCEL_HANDLE_REQUEST_BY_DEADLINE">USERVER_CANCEL_HANDLE_REQUEST_BY_DEADLINE</a></li>
</ul>
<h2><a class="anchor" id="autotoc_md570"></a>
Static options:</h2>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Name </th><th class="markdownTableHeadNone">Description </th><th class="markdownTableHeadNone">Default value </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">logger_access </td><td class="markdownTableBodyNone">set to logger name from <a class="el" href="../../d4/da4/classcomponents_1_1Logging.html" title="Logging component">components::Logging</a> component to write access logs into it; do not set to avoid writing access logs </td><td class="markdownTableBodyNone">- </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">logger_access_tskv </td><td class="markdownTableBodyNone">set to logger name from <a class="el" href="../../d4/da4/classcomponents_1_1Logging.html" title="Logging component">components::Logging</a> component to write access logs in TSKV format into it; do not set to avoid writing access logs </td><td class="markdownTableBodyNone">- </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">max_response_size_in_flight </td><td class="markdownTableBodyNone">set it to the size of response in bytes and the component will drop bigger responses from handlers that allow trottling </td><td class="markdownTableBodyNone">- </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">server-name </td><td class="markdownTableBodyNone">value to send in HTTP <a class="el" href="../../d0/d0b/classcomponents_1_1Server.html" title="Component that listens for incomming requests, manages incomming connections and passes the requests ...">Server</a> header </td><td class="markdownTableBodyNone">value from <a class="el" href="../../d6/d84/namespaceutils.html#a4da387ceb01067c81a12697aaa61853a">utils::GetUserverIdentifier()</a> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">listener </td><td class="markdownTableBodyNone">(<em>required</em>) <em>see below</em> </td><td class="markdownTableBodyNone">- </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">listener-monitor </td><td class="markdownTableBodyNone"><em>see below</em> </td><td class="markdownTableBodyNone">- </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">set-response-server-hostname </td><td class="markdownTableBodyNone">set to true to add the <code>X-YaTaxi-Server-Hostname</code> header with instance name, set to false to not add the header </td><td class="markdownTableBodyNone">false </td></tr>
</table>
<p ><a class="el" href="../../d0/d0b/classcomponents_1_1Server.html" title="Component that listens for incomming requests, manages incomming connections and passes the requests ...">Server</a> is configured by 'listener' and 'listener-monitor' entries. 'listener' is a required entry that describes the request processing socket. 'listener-monitor' is an optional entry that describes the special monitoring socket, used for getting statistics and processing utility requests that should succeed even is the main socket is under heavy pressure.</p>
<p >Each of the 'listener' and 'listener-monitor' may be configured with the following options:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Name </th><th class="markdownTableHeadNone">Description </th><th class="markdownTableHeadNone">Default value </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">port </td><td class="markdownTableBodyNone">port to listen on </td><td class="markdownTableBodyNone">0 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">unix-socket </td><td class="markdownTableBodyNone">unix socket to listen on instead of listening on a port </td><td class="markdownTableBodyNone">'' </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">max_connections </td><td class="markdownTableBodyNone">max connections count to keep </td><td class="markdownTableBodyNone">32768 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">task_processor </td><td class="markdownTableBodyNone">task processor to process incomming requests </td><td class="markdownTableBodyNone">- </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">backlog </td><td class="markdownTableBodyNone">max count of new coneections pending acceptance </td><td class="markdownTableBodyNone">1024 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">handler-defaults.max_url_size </td><td class="markdownTableBodyNone">max path/URL size or empty to not limit </td><td class="markdownTableBodyNone">8192 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">handler-defaults.max_request_size </td><td class="markdownTableBodyNone">max size of the whole request </td><td class="markdownTableBodyNone">1024 * 1024 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">handler-defaults.max_headers_size </td><td class="markdownTableBodyNone">max request headers size </td><td class="markdownTableBodyNone">65536 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">handler-defaults.parse_args_from_body </td><td class="markdownTableBodyNone">optional field to parse request according to x-www-form-urlencoded rules and make parameters accessible as query parameters </td><td class="markdownTableBodyNone">false </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">connection.in_buffer_size </td><td class="markdownTableBodyNone">size of the buffer to preallocate for request receive: bigger values use more RAM and less CPU </td><td class="markdownTableBodyNone">32 * 1024 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">connection.requests_queue_size_threshold </td><td class="markdownTableBodyNone">drop requests from handlers that allow trottling if there's more pending requests than allowed by this value </td><td class="markdownTableBodyNone">100 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">connection.keepalive_timeout </td><td class="markdownTableBodyNone">timeout in seconds to drop connection if there's not data received from it </td><td class="markdownTableBodyNone">600 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">shards </td><td class="markdownTableBodyNone">how many concurrent tasks harvest data from a single socket; do not set if not sure what it is doing </td><td class="markdownTableBodyNone">- </td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="../../d3/ddd/core_2include_2userver_2server_2component_8hpp_source.html#l00075">75</a> of file <a class="el" href="../../d3/ddd/core_2include_2userver_2server_2component_8hpp_source.html">component.hpp</a>.</p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="ad450b73070784e7e90cd4ebaff19e8c0" name="ad450b73070784e7e90cd4ebaff19e8c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad450b73070784e7e90cd4ebaff19e8c0">◆ </a></span>kName</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr std::string_view components::Server::kName = "server"</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d3/ddd/core_2include_2userver_2server_2component_8hpp_source.html#l00077">77</a> of file <a class="el" href="../../d3/ddd/core_2include_2userver_2server_2component_8hpp_source.html">component.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>userver/server/<a class="el" href="../../d3/ddd/core_2include_2userver_2server_2component_8hpp_source.html">component.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<hr class="footer"/>
<address class="footer"><small>
Generated on Fri Sep 23 2022 12:31:56 for userver by <a href="http://www.doxygen.org/index.html">Doxygen</a> 1.9.5
</small></address>
<script type="text/javascript">
const LOWER_CASE_TRANSLITTERATION_MAPPING = {
"а":"a", "б":"b", "в":"v", "г":"g", "д":"d", "е":"e", "ё":"jo", "ж":"zh",
"з":"z", "и":"i", "й":"jj", "к":"k", "л":"l", "м":"m", "н":"n", "о":"o",
"п":"p", "р":"r", "с":"s", "т":"t", "у":"u", "ф":"f", "х":"x", "ц":"c",
"ч":"ch", "ш":"sh", "щ":"shh", "ъ":"\'", "ы":"y", "ь":"\'", "э":"je",
"ю":"ju", "я":"ja"
};
const DOXYGEN_DIAMOND_STRING = '◆\u00A0' // ◆
function make_id(raw_id) {
return raw_id.toLowerCase().split('').map(function (char) {
return LOWER_CASE_TRANSLITTERATION_MAPPING[char] || char;
}).join('').replace(/\W/g, '');
}
const html_escape = function () {
const p = document.createElement('p');
return function (text) {
p.textContent = text;
return p.innerHTML;
};
}();
function draw_toc() {
let headers = $(':header');
if (headers.length === 0) {
return;
}
let sidenav_content = '<div id="mySidenav" class="sidenav">';
sidenav_content += '<h2>Table of contents</h2>';
headers.each(function() {
let index = parseInt(this.nodeName.substring(1)) - 1;
const header = $(this);
let id = header.attr('id');
if (!id) {
id = make_id(header.text())
header.attr('id', id);
}
let header_text = header.text()
if (header_text.startsWith(DOXYGEN_DIAMOND_STRING)) {
++index;
header_text = header_text.substring(DOXYGEN_DIAMOND_STRING.length);
}
sidenav_content += ''
+ '<a href="#' + id + '" style="padding-left: ' + index * 15 + 'px">'
+ '• ' + html_escape(header_text)
+ '</a>'
;
header.append(' <a class="hoverlink" href="#' + id + '">🔗</a>')
});
sidenav_content += '</div>';
$(sidenav_content).insertAfter('.header');
}
function highlight_code() {
if (window.location.href.indexOf("pp_source") !== -1
|| window.location.href.indexOf("cpp-example") !== -1) {
// Header listing is already nicely highlighted by Doxygen
return;
}
hljs.configure({
tabReplace: ' ' // 4 spaces
});
hljs.registerAliases('sh', {languageName: 'shell'});
hljs.registerAliases('bash', {languageName: 'shell'});
hljs.registerAliases('yml', {languageName: 'yaml'});
hljs.registerAliases('plain', {languageName: 'plaintext'});
hljs.registerAliases('tskv', {languageName: 'plaintext'});
$(".fragment").each(function() {
const node = $(this);
let data = '';
let language = '';
let requires_higlighting = true;
node.children('div.line').each(function(i) {
line = $(this).text();
// Doxygen 1.8.11 workaround to remove line numbers.
// No line numbers added in Doxygen 1.8.13
line = line.replace(/^ *\d+\xA0/, '');
if (i === 0) {
line = line.trimLeft().replace(/^# /, '');
if (line === 'autodetect') {
return true;
} else if (hljs.getLanguage(line)) {
language = line;
return true;
} else {
requires_higlighting = false;
return false;
}
}
data += line + '\n';
});
if (requires_higlighting === false) {
return;
}
if (language !== '') {
data = hljs.highlight(language, data).value;
} else {
data = hljs.highlightAuto(data).value;
}
node.replaceWith('<div class="fragment"><pre>' + data + '</pre></div>');
});
}
function setup_if_landing() {
if (document.getElementById('landing_logo_id') === null) {
return false;
}
$(function() {
const main_nav = $('#main-nav');
main_nav.addClass('main-nav-landing');
main_nav.append('<hr>');
});
return true;
}
function sticky_menu() {
const main_nav = $('#main-nav');
const menu_y_position = 94;
const search_results_window = $('#MSearchResultsWindow');
const search_select_window = $('#MSearchSelectWindow');
var menu_is_sticky = false;
const stick = function () {
if ($(this).scrollTop() > menu_y_position) {
if (menu_is_sticky) return;
search_results_window.addClass('stickySearchResults');
search_select_window.addClass('stickySearchResults');
main_nav.addClass('stickyHeader');
// Prevent page quick movement as the menu sticks to the top
document.body.style.paddingTop = '36px';
menu_is_sticky = true;
} else {
if (!menu_is_sticky) return;
search_results_window.removeClass('stickySearchResults');
search_select_window.removeClass('stickySearchResults');
// 'top' property of the results window is computed by Doxygen JS
// and it may give bad results if the computation is invoked at the
// middle of the page.
//
// Hiding the window. Doxygen will recompute and show it on new
// user input.
search_results_window.hide();
main_nav.removeClass('stickyHeader');
document.body.style.paddingTop = '0px';
menu_is_sticky = false;
}
};
stick(); // on page refresh draw the menu on the right position
$(window).on("scroll", stick);
}
function telegram_channel_language() {
if (/^ru/.test(navigator.language)) {
const channel = $('#telegram_channel');
if (channel) {
channel.attr('href', 'https://t.me/userver_ru');
}
}
}
// We do not use $(function() { ... }); because
// * all the elements (except menue parts) are already parsed up above
// * skipping it speedups page load
// * with it Firefox does not scroll to a JS generated anchor links
telegram_channel_language();
if (!setup_if_landing()) {
draw_toc();
highlight_code();
sticky_menu();
}
</script>
</body>
</html>