-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBrookHTTPServer.html
More file actions
183 lines (182 loc) · 11.7 KB
/
BrookHTTPServer.html
File metadata and controls
183 lines (182 loc) · 11.7 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Brook Tardigrade: BrookHTTPServer</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="tipuesearch/tipuesearch.css">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<div class="container"><div class="navigation">
<h2><a href="index.html">Brook Tardigrade</a></h2><ul><li><a href="AllUnits.html">Units</a></li><li><a href="ClassHierarchy.html">Class Hierarchy</a></li><li><a href="AllClasses.html">Classes, Interfaces, Objects and Records</a></li><li><a href="AllTypes.html">Types</a></li><li><a href="AllVariables.html">Variables</a></li><li><a href="AllConstants.html">Constants</a></li><li><a href="AllFunctions.html">Functions and Procedures</a></li><li><a href="AllIdentifiers.html">Identifiers</a></li><li><form class="search-form" action="tipue_results.html"><div class="search-input"><input type="text" name="q" id="tipue_search_input" pattern=".{3,}" title="At least 3 characters" required><div class="search-button"><input type="button" id="tipue_search_button" onclick="this.form.submit();"></div></div></form>
<div style="clear: both"></div>
</li></ul></div><div class="content">
<h1 class="unit">Unit BrookHTTPServer</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Uses">Uses</a></div><div class="one_section"><a class="section" href="#PasDoc-Classes">Classes, Interfaces, Objects and Records</a></div><div class="one_section">Functions and Procedures</div><div class="one_section"><a class="section" href="#PasDoc-Types">Types</a></div><div class="one_section"><a class="section" href="#PasDoc-Constants">Constants</a></div><div class="one_section">Variables</div></div>
<span id="PasDoc-Description"></span><h2 class="description">Description</h2>
<p>
Contains classes which composes a fast event-driven HTTP(S) server.</p>
<span id="PasDoc-Uses"></span><h2 class="uses">Uses</h2>
<ul class="useslist"><li>SysUtils</li><li>Classes</li><li>Marshalling</li><li>libsagui</li><li><a href="BrookUtility.html">BrookUtility</a></li><li><a href="BrookHandledClasses.html">BrookHandledClasses</a></li><li><a href="BrookExtra.html">BrookExtra</a></li><li><a href="BrookHTTPAuthentication.html">BrookHTTPAuthentication</a></li><li><a href="BrookHTTPRequest.html">BrookHTTPRequest</a></li><li><a href="BrookHTTPResponse.html">BrookHTTPResponse</a></li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Classes"></span><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
<table class="classestable wide_list">
<tr class="listheader">
<th class="itemname">Name</th>
<th class="itemdesc">Description</th>
</tr>
<tr class="list">
<td class="itemname">Class <a class="bold" href="BrookHTTPServer.EBrookHTTPServerSecurity.html"><code>EBrookHTTPServerSecurity</code></a></td>
<td class="itemdesc">Handles exceptions related to HTTP server security.</td>
</tr>
<tr class="list2">
<td class="itemname">Class <a class="bold" href="BrookHTTPServer.TBrookHTTPServerSecurity.html"><code>TBrookHTTPServerSecurity</code></a></td>
<td class="itemdesc">Class which holds the TLS properties for the HTTPS server.</td>
</tr>
<tr class="list">
<td class="itemname">Class <a class="bold" href="BrookHTTPServer.EBrookHTTPServer.html"><code>EBrookHTTPServer</code></a></td>
<td class="itemdesc">Handles exceptions related to HTTP server.</td>
</tr>
<tr class="list2">
<td class="itemname">Class <a class="bold" href="BrookHTTPServer.TBrookHTTPServer.html"><code>TBrookHTTPServer</code></a></td>
<td class="itemdesc">Fast event-driven HTTP(S) server class.</td>
</tr>
</table>
<span id="PasDoc-Types"></span><h3 class="summary">Types</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookHTTPServer.html#TBrookHTTPAuthenticateEvent">TBrookHTTPAuthenticateEvent</a></strong> = function(ASender: TObject; AAuthentication: <a href="BrookHTTPAuthentication.TBrookHTTPAuthentication.html">TBrookHTTPAuthentication</a>; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>): Boolean of object;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="BrookHTTPServer.html#TBrookHTTPAuthenticateErrorEvent">TBrookHTTPAuthenticateErrorEvent</a></strong> = procedure(ASender: TObject; AAuthentication: <a href="BrookHTTPAuthentication.TBrookHTTPAuthentication.html">TBrookHTTPAuthentication</a>; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>; AException: Exception) of object;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookHTTPServer.html#TBrookHTTPRequestEvent">TBrookHTTPRequestEvent</a></strong> = procedure(ASender: TObject; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>) of object;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="BrookHTTPServer.html#TBrookHTTPRequestErrorEvent">TBrookHTTPRequestErrorEvent</a></strong> = procedure(ASender: TObject; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>; AException: Exception) of object;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookHTTPServer.html#TBrookHTTPServerClientConnectionEvent">TBrookHTTPServerClientConnectionEvent</a></strong> = procedure(ASender: TObject; const AClient: Pointer; var AClosed: Boolean) of object;</code></td>
</tr>
</table>
<span id="PasDoc-Constants"></span><h3 class="summary">Constants</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookHTTPServer.html#SBrookActiveServer">SBrookActiveServer</a></strong> = 'Active server.';</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="BrookHTTPServer.html#SBrookCannotCreateServerHandle">SBrookCannotCreateServerHandle</a></strong> = 'Cannot create server handle.';</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookHTTPServer.html#SBrookTLSNotAvailable">SBrookTLSNotAvailable</a></strong> = Concat(
'TLS is not available. Please download the Sagui library with ',
'TLS support at: https://github.com/risoflora/libsagui/releases');</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><strong><a href="BrookHTTPServer.html#SBrookEmptyPrivateKey">SBrookEmptyPrivateKey</a></strong> = 'Private key cannot be empty.';</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><strong><a href="BrookHTTPServer.html#SBrookEmptyCertificate">SBrookEmptyCertificate</a></strong> = 'Certificate cannot be empty.';</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Types</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="TBrookHTTPAuthenticateEvent"></span><code><strong>TBrookHTTPAuthenticateEvent</strong> = function(ASender: TObject; AAuthentication: <a href="BrookHTTPAuthentication.TBrookHTTPAuthentication.html">TBrookHTTPAuthentication</a>; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>): Boolean of object;</code></td>
</tr>
<tr><td colspan="1">
<p>
Event signature used by HTTP server to handle the clients authentication.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="TBrookHTTPAuthenticateErrorEvent"></span><code><strong>TBrookHTTPAuthenticateErrorEvent</strong> = procedure(ASender: TObject; AAuthentication: <a href="BrookHTTPAuthentication.TBrookHTTPAuthentication.html">TBrookHTTPAuthentication</a>; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>; AException: Exception) of object;</code></td>
</tr>
<tr><td colspan="1">
<p>
Event signature used by HTTP server to handle errors in the clients authentication.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="TBrookHTTPRequestEvent"></span><code><strong>TBrookHTTPRequestEvent</strong> = procedure(ASender: TObject; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>) of object;</code></td>
</tr>
<tr><td colspan="1">
<p>
Event signature used by HTTP server to handle requests.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="TBrookHTTPRequestErrorEvent"></span><code><strong>TBrookHTTPRequestErrorEvent</strong> = procedure(ASender: TObject; ARequest: <a href="BrookHTTPRequest.TBrookHTTPRequest.html">TBrookHTTPRequest</a>; AResponse: <a href="BrookHTTPResponse.TBrookHTTPResponse.html">TBrookHTTPResponse</a>; AException: Exception) of object;</code></td>
</tr>
<tr><td colspan="1">
<p>
Event signature used by HTTP server to handle error in the requests.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="TBrookHTTPServerClientConnectionEvent"></span><code><strong>TBrookHTTPServerClientConnectionEvent</strong> = procedure(ASender: TObject; const AClient: Pointer; var AClosed: Boolean) of object;</code></td>
</tr>
<tr><td colspan="1">
<p>
Event signature used by HTTP server to handle client connection events.</p>
</td></tr>
</table>
<h3 class="detail">Constants</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookActiveServer"></span><code><strong>SBrookActiveServer</strong> = 'Active server.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'Active server.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookCannotCreateServerHandle"></span><code><strong>SBrookCannotCreateServerHandle</strong> = 'Cannot create server handle.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'Cannot create server handle.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookTLSNotAvailable"></span><code><strong>SBrookTLSNotAvailable</strong> = Concat(
'TLS is not available. Please download the Sagui library with ',
'TLS support at: https://github.com/risoflora/libsagui/releases');</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'TLS is not available.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookEmptyPrivateKey"></span><code><strong>SBrookEmptyPrivateKey</strong> = 'Private key cannot be empty.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'Private key cannot be empty.'</code>.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><span id="SBrookEmptyCertificate"></span><code><strong>SBrookEmptyCertificate</strong> = 'Certificate cannot be empty.';</code></td>
</tr>
<tr><td colspan="1">
<p>
Error message <code>'Certificate cannot be empty.'</code>.</p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0</a>. </em>
</span>
</div></div></body></html>