source: trunk/Packages/synapse/docs/help/blcksock.html

Last change on this file was 2, checked in by chronos, 12 years ago
  • Přidáno: Základní kostra projektu.
  • Přidáno: Knihovna synapse.
File size: 18.2 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
2<html>
3<head>
4<meta name="GENERATOR" content="PasDoc 0.9.0">
5<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
6<title>blcksock</title>
7<link rel="StyleSheet" type="text/css" href="pasdoc.css">
8</head>
9<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#FF0000">
10<h1 class="unit">Unit blcksock</h1>
11<table class="sections">
12<tr>
13<td><a class="section" href="#@Description">Description</a></td><td><a class="section" href="#@Uses">uses</a></td><td><a class="section" href="#@Classes">Classes, Interfaces, Objects and Records</a></td><td>Functions and Procedures</td><td><a class="section" href="#@Types">Types</a></td><td><a class="section" href="#@Constants">Constants</a></td><td><a class="section" href="#@Variables">Variables</a></td></tr></table>
14<a name="@Description"></a><h2 class="description">Description</h2>
15&nbsp;<a name="@Uses"></a><h2 class="uses">uses</h2>
16<ul class="useslist"><li>SysUtils</li><li>Classes</li><li><a href="synafpc.html">synafpc</a></li><li>synsock</li><li><a href="synautil.html">synautil</a></li><li><a href="synacode.html">synacode</a></li><li><a href="synaip.html">synaip</a></li></ul><h2 class="overview">Overview</h2>
17<a name="@Classes"></a><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
18<table class="classestable">
19<tr class="listheader">
20<th class="itemname">Name</th>
21<th class="itemdesc">Description</th>
22</tr>
23<tr class="list">
24<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.ESynapseError.html"><code>ESynapseError</code></a></td>
25<td class="itemdesc">Exception clas used by Synapse</td>
26</tr>
27<tr class="list2">
28<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TSynaOption.html"><code>TSynaOption</code></a></td>
29<td class="itemdesc">this object is used for remember delayed socket option set.</td>
30</tr>
31<tr class="list">
32<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TBlockSocket.html"><code>TBlockSocket</code></a></td>
33<td class="itemdesc">Basic IP object.</td>
34</tr>
35<tr class="list2">
36<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TSocksBlockSocket.html"><code>TSocksBlockSocket</code></a></td>
37<td class="itemdesc">Support for SOCKS4 and SOCKS5 proxy</td>
38</tr>
39<tr class="list">
40<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TTCPBlockSocket.html"><code>TTCPBlockSocket</code></a></td>
41<td class="itemdesc">Implementation of TCP socket.</td>
42</tr>
43<tr class="list2">
44<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TDgramBlockSocket.html"><code>TDgramBlockSocket</code></a></td>
45<td class="itemdesc">Datagram based communication</td>
46</tr>
47<tr class="list">
48<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TUDPBlockSocket.html"><code>TUDPBlockSocket</code></a></td>
49<td class="itemdesc">Implementation of UDP socket.</td>
50</tr>
51<tr class="list2">
52<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TICMPBlockSocket.html"><code>TICMPBlockSocket</code></a></td>
53<td class="itemdesc">Implementation of RAW ICMP socket.</td>
54</tr>
55<tr class="list">
56<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TRAWBlockSocket.html"><code>TRAWBlockSocket</code></a></td>
57<td class="itemdesc">Implementation of RAW socket.</td>
58</tr>
59<tr class="list2">
60<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TPGMMessageBlockSocket.html"><code>TPGMMessageBlockSocket</code></a></td>
61<td class="itemdesc">Implementation of PGM-message socket.</td>
62</tr>
63<tr class="list">
64<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TPGMStreamBlockSocket.html"><code>TPGMStreamBlockSocket</code></a></td>
65<td class="itemdesc">Implementation of PGM-stream socket.</td>
66</tr>
67<tr class="list2">
68<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TCustomSSL.html"><code>TCustomSSL</code></a></td>
69<td class="itemdesc">Parent class for all SSL plugins.</td>
70</tr>
71<tr class="list">
72<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TSSLNone.html"><code>TSSLNone</code></a></td>
73<td class="itemdesc">Default SSL plugin with no SSL support.</td>
74</tr>
75<tr class="list2">
76<td class="itemname">record&nbsp;<a class="bold" href="blcksock.TIPHeader.html"><code>TIPHeader</code></a></td>
77<td class="itemdesc">Record with definition of IP packet header.</td>
78</tr>
79<tr class="list">
80<td class="itemname">Class&nbsp;<a class="bold" href="blcksock.TSynaClient.html"><code>TSynaClient</code></a></td>
81<td class="itemdesc">Parent class of application protocol implementations.</td>
82</tr>
83</table>
84<a name="@Types"></a><h3 class="summary">Types</h3>
85<table class="summary">
86<tr class="list">
87<td class="itemcode"><code><b><a href="blcksock.html#THookSocketReason">THookSocketReason</a></b> = (...);</code></td>
88</tr>
89<tr class="list2">
90<td class="itemcode"><code><b><a href="blcksock.html#THookSocketStatus">THookSocketStatus</a></b> = procedure(Sender: TObject; Reason: <a href="blcksock.html#THookSocketReason">THookSocketReason</a>; const Value: String) of object;</code></td>
91</tr>
92<tr class="list">
93<td class="itemcode"><code><b><a href="blcksock.html#THookDataFilter">THookDataFilter</a></b> = procedure(Sender: TObject; var Value: AnsiString) of object;</code></td>
94</tr>
95<tr class="list2">
96<td class="itemcode"><code><b><a href="blcksock.html#THookCreateSocket">THookCreateSocket</a></b> = procedure(Sender: TObject) of object;</code></td>
97</tr>
98<tr class="list">
99<td class="itemcode"><code><b><a href="blcksock.html#THookMonitor">THookMonitor</a></b> = procedure(Sender: TObject; Writing: Boolean; const Buffer: TMemory; Len: Integer) of object;</code></td>
100</tr>
101<tr class="list2">
102<td class="itemcode"><code><b><a href="blcksock.html#THookAfterConnect">THookAfterConnect</a></b> = procedure(Sender: TObject) of object;</code></td>
103</tr>
104<tr class="list">
105<td class="itemcode"><code><b><a href="blcksock.html#THookVerifyCert">THookVerifyCert</a></b> = function(Sender: TObject):boolean of object;</code></td>
106</tr>
107<tr class="list2">
108<td class="itemcode"><code><b><a href="blcksock.html#THookHeartbeat">THookHeartbeat</a></b> = procedure(Sender: TObject) of object;</code></td>
109</tr>
110<tr class="list">
111<td class="itemcode"><code><b><a href="blcksock.html#TSocketFamily">TSocketFamily</a></b> = (...);</code></td>
112</tr>
113<tr class="list2">
114<td class="itemcode"><code><b><a href="blcksock.html#TSocksType">TSocksType</a></b> = (...);</code></td>
115</tr>
116<tr class="list">
117<td class="itemcode"><code><b><a href="blcksock.html#TSSLType">TSSLType</a></b> = (...);</code></td>
118</tr>
119<tr class="list2">
120<td class="itemcode"><code><b><a href="blcksock.html#TSynaOptionType">TSynaOptionType</a></b> = (...);</code></td>
121</tr>
122<tr class="list">
123<td class="itemcode"><code><b><a href="blcksock.html#TSSLClass">TSSLClass</a></b> = class of <a href="blcksock.TCustomSSL.html">TCustomSSL</a>;</code></td>
124</tr>
125</table>
126<a name="@Constants"></a><h3 class="summary">Constants</h3>
127<table class="summary">
128<tr class="list">
129<td class="itemcode"><code><b><a href="blcksock.html#SynapseRelease">SynapseRelease</a></b> = '38';</code></td>
130</tr>
131<tr class="list2">
132<td class="itemcode"><code><b><a href="blcksock.html#cLocalhost">cLocalhost</a></b> = '127.0.0.1';</code></td>
133</tr>
134<tr class="list">
135<td class="itemcode"><code><b><a href="blcksock.html#cAnyHost">cAnyHost</a></b> = '0.0.0.0';</code></td>
136</tr>
137<tr class="list2">
138<td class="itemcode"><code><b><a href="blcksock.html#cBroadcast">cBroadcast</a></b> = '255.255.255.255';</code></td>
139</tr>
140<tr class="list">
141<td class="itemcode"><code><b><a href="blcksock.html#c6Localhost">c6Localhost</a></b> = '::1';</code></td>
142</tr>
143<tr class="list2">
144<td class="itemcode"><code><b><a href="blcksock.html#c6AnyHost">c6AnyHost</a></b> = '::0';</code></td>
145</tr>
146<tr class="list">
147<td class="itemcode"><code><b><a href="blcksock.html#c6Broadcast">c6Broadcast</a></b> = 'ffff::1';</code></td>
148</tr>
149<tr class="list2">
150<td class="itemcode"><code><b><a href="blcksock.html#cAnyPort">cAnyPort</a></b> = '0';</code></td>
151</tr>
152<tr class="list">
153<td class="itemcode"><code><b><a href="blcksock.html#CR">CR</a></b> = #$0d;</code></td>
154</tr>
155<tr class="list2">
156<td class="itemcode"><code><b><a href="blcksock.html#LF">LF</a></b> = #$0a;</code></td>
157</tr>
158<tr class="list">
159<td class="itemcode"><code><b><a href="blcksock.html#CRLF">CRLF</a></b> = <a href="blcksock.html#CR">CR</a> + <a href="blcksock.html#LF">LF</a>;</code></td>
160</tr>
161<tr class="list2">
162<td class="itemcode"><code><b><a href="blcksock.html#c64k">c64k</a></b> = 65536;</code></td>
163</tr>
164</table>
165<a name="@Variables"></a><h3 class="summary">Variables</h3>
166<table class="summary">
167<tr class="list">
168<td class="itemcode"><code><b><a href="blcksock.html#SSLImplementation">SSLImplementation</a></b>: <a href="blcksock.html#TSSLClass">TSSLClass</a> = <a href="blcksock.TSSLNone.html">TSSLNone</a>;</code></td>
169</tr>
170</table>
171<h2 class="description">Description</h2>
172<h3 class="detail">Types</h3>
173<table class="detail">
174<tr class="list">
175<td class="itemcode"><a name="THookSocketReason"></a><code><b>THookSocketReason</b> = (...);</code></td>
176</tr>
177</table>
178<p>
179Types of OnStatus events</p>
180<ul>
181<li>
182HR_ResolvingBegin: Resolving is begin. Resolved IP and port is in parameter in format like: 'localhost.somewhere.com:25'.</li>
183<li>
184HR_ResolvingEnd: Resolving is done. Resolved IP and port is in parameter in format like: 'localhost.somewhere.com:25'. It is always same as in HR_ResolvingBegin!</li>
185<li>
186HR_SocketCreate: Socket created by CreateSocket method. It reporting Family of created socket too!</li>
187<li>
188HR_SocketClose: Socket closed by CloseSocket method.</li>
189<li>
190HR_Bind: Socket binded to IP and Port. Binded IP and Port is in parameter in format like: 'localhost.somewhere.com:25'.</li>
191<li>
192HR_Connect: Socket connected to IP and Port. Connected IP and Port is in parameter in format like: 'localhost.somewhere.com:25'.</li>
193<li>
194HR_CanRead: Called when CanRead method is used with <code>True</code> result.</li>
195<li>
196HR_CanWrite: Called when CanWrite method is used with <code>True</code> result.</li>
197<li>
198HR_Listen: Socket is swithed to Listen mode. (TCP socket only)</li>
199<li>
200HR_Accept: Socket Accepting client connection. (TCP socket only)</li>
201<li>
202HR_ReadCount: report count of bytes readed from socket. Number is in parameter string. If you need is in integer, you must use StrToInt function!</li>
203<li>
204HR_WriteCount: report count of bytes writed to socket. Number is in parameter string. If you need is in integer, you must use StrToInt function!</li>
205<li>
206HR_Wait: If is limiting of bandwidth on, then this reason is called when sending or receiving is stopped for satisfy bandwidth limit. Parameter is count of waiting milliseconds.</li>
207<li>
208HR_Error: report situation where communication error occured. When raiseexcept is <code>True</code>, then exception is called after this Hook reason.</li>
209</ul>
210<table class="detail">
211<tr class="list">
212<td class="itemcode"><a name="THookSocketStatus"></a><code><b>THookSocketStatus</b> = procedure(Sender: TObject; Reason: <a href="blcksock.html#THookSocketReason">THookSocketReason</a>; const Value: String) of object;</code></td>
213</tr>
214</table>
215<p>
216Procedural type for OnStatus event. Sender is calling TBlockSocket object, Reason is one of set Status events and value is optional data.</p>
217<table class="detail">
218<tr class="list">
219<td class="itemcode"><a name="THookDataFilter"></a><code><b>THookDataFilter</b> = procedure(Sender: TObject; var Value: AnsiString) of object;</code></td>
220</tr>
221</table>
222<p>
223This procedural type is used for DataFilter hooks.</p>
224<table class="detail">
225<tr class="list">
226<td class="itemcode"><a name="THookCreateSocket"></a><code><b>THookCreateSocket</b> = procedure(Sender: TObject) of object;</code></td>
227</tr>
228</table>
229<p>
230This procedural type is used for hook OnCreateSocket. By this hook you can insert your code after initialisation of socket. (you can set special socket options, etc.)</p>
231<table class="detail">
232<tr class="list">
233<td class="itemcode"><a name="THookMonitor"></a><code><b>THookMonitor</b> = procedure(Sender: TObject; Writing: Boolean; const Buffer: TMemory; Len: Integer) of object;</code></td>
234</tr>
235</table>
236<p>
237This procedural type is used for monitoring of communication.</p>
238<table class="detail">
239<tr class="list">
240<td class="itemcode"><a name="THookAfterConnect"></a><code><b>THookAfterConnect</b> = procedure(Sender: TObject) of object;</code></td>
241</tr>
242</table>
243<p>
244This procedural type is used for hook OnAfterConnect. By this hook you can insert your code after TCP socket has been sucessfully connected.</p>
245<table class="detail">
246<tr class="list">
247<td class="itemcode"><a name="THookVerifyCert"></a><code><b>THookVerifyCert</b> = function(Sender: TObject):boolean of object;</code></td>
248</tr>
249</table>
250<p>
251This procedural type is used for hook OnVerifyCert. By this hook you can insert your additional certificate verification code. Usefull to verify server CN against URL.</p>
252<table class="detail">
253<tr class="list">
254<td class="itemcode"><a name="THookHeartbeat"></a><code><b>THookHeartbeat</b> = procedure(Sender: TObject) of object;</code></td>
255</tr>
256</table>
257<p>
258This procedural type is used for hook OnHeartbeat. By this hook you can call your code repeately during long socket operations. You must enable heartbeats by <code>HeartbeatRate</code> property!</p>
259<table class="detail">
260<tr class="list">
261<td class="itemcode"><a name="TSocketFamily"></a><code><b>TSocketFamily</b> = (...);</code></td>
262</tr>
263</table>
264<p>
265Specify family of socket.</p>
266<ul>
267<li>
268SF_Any: Default mode. Socket family is defined by target address for connection. It allows instant access to IPv4 and IPv6 nodes. When you need IPv6 address as destination, then is used IPv6 mode. othervise is used IPv4 mode. However this mode not working properly with preliminary IPv6 supports!</li>
269<li>
270SF_IP4: Turn this class to pure IPv4 mode. This mode is totally compatible with previous Synapse releases.</li>
271<li>
272SF_IP6: Turn to only IPv6 mode.</li>
273</ul>
274<table class="detail">
275<tr class="list">
276<td class="itemcode"><a name="TSocksType"></a><code><b>TSocksType</b> = (...);</code></td>
277</tr>
278</table>
279<p>
280specify possible values of SOCKS modes.</p>
281<ul>
282<li>
283ST_Socks5: </li>
284<li>
285ST_Socks4: </li>
286</ul>
287<table class="detail">
288<tr class="list">
289<td class="itemcode"><a name="TSSLType"></a><code><b>TSSLType</b> = (...);</code></td>
290</tr>
291</table>
292<p>
293Specify requested SSL/TLS version for secure connection.</p>
294<ul>
295<li>
296LT_all: </li>
297<li>
298LT_SSLv2: </li>
299<li>
300LT_SSLv3: </li>
301<li>
302LT_TLSv1: </li>
303<li>
304LT_TLSv1_1: </li>
305<li>
306LT_SSHv2: </li>
307</ul>
308<table class="detail">
309<tr class="list">
310<td class="itemcode"><a name="TSynaOptionType"></a><code><b>TSynaOptionType</b> = (...);</code></td>
311</tr>
312</table>
313<p>
314Specify type of socket delayed option.</p>
315<ul>
316<li>
317SOT_Linger: </li>
318<li>
319SOT_RecvBuff: </li>
320<li>
321SOT_SendBuff: </li>
322<li>
323SOT_NonBlock: </li>
324<li>
325SOT_RecvTimeout: </li>
326<li>
327SOT_SendTimeout: </li>
328<li>
329SOT_Reuse: </li>
330<li>
331SOT_TTL: </li>
332<li>
333SOT_Broadcast: </li>
334<li>
335SOT_MulticastTTL: </li>
336<li>
337SOT_MulticastLoop: </li>
338</ul>
339<table class="detail">
340<tr class="list">
341<td class="itemcode"><a name="TSSLClass"></a><code><b>TSSLClass</b> = class of <a href="blcksock.TCustomSSL.html">TCustomSSL</a>;</code></td>
342</tr>
343</table>
344&nbsp;<h3 class="detail">Constants</h3>
345<table class="detail">
346<tr class="list">
347<td class="itemcode"><a name="SynapseRelease"></a><code><b>SynapseRelease</b> = '38';</code></td>
348</tr>
349</table>
350&nbsp;<table class="detail">
351<tr class="list">
352<td class="itemcode"><a name="cLocalhost"></a><code><b>cLocalhost</b> = '127.0.0.1';</code></td>
353</tr>
354</table>
355&nbsp;<table class="detail">
356<tr class="list">
357<td class="itemcode"><a name="cAnyHost"></a><code><b>cAnyHost</b> = '0.0.0.0';</code></td>
358</tr>
359</table>
360&nbsp;<table class="detail">
361<tr class="list">
362<td class="itemcode"><a name="cBroadcast"></a><code><b>cBroadcast</b> = '255.255.255.255';</code></td>
363</tr>
364</table>
365&nbsp;<table class="detail">
366<tr class="list">
367<td class="itemcode"><a name="c6Localhost"></a><code><b>c6Localhost</b> = '::1';</code></td>
368</tr>
369</table>
370&nbsp;<table class="detail">
371<tr class="list">
372<td class="itemcode"><a name="c6AnyHost"></a><code><b>c6AnyHost</b> = '::0';</code></td>
373</tr>
374</table>
375&nbsp;<table class="detail">
376<tr class="list">
377<td class="itemcode"><a name="c6Broadcast"></a><code><b>c6Broadcast</b> = 'ffff::1';</code></td>
378</tr>
379</table>
380&nbsp;<table class="detail">
381<tr class="list">
382<td class="itemcode"><a name="cAnyPort"></a><code><b>cAnyPort</b> = '0';</code></td>
383</tr>
384</table>
385&nbsp;<table class="detail">
386<tr class="list">
387<td class="itemcode"><a name="CR"></a><code><b>CR</b> = #$0d;</code></td>
388</tr>
389</table>
390&nbsp;<table class="detail">
391<tr class="list">
392<td class="itemcode"><a name="LF"></a><code><b>LF</b> = #$0a;</code></td>
393</tr>
394</table>
395&nbsp;<table class="detail">
396<tr class="list">
397<td class="itemcode"><a name="CRLF"></a><code><b>CRLF</b> = <a href="blcksock.html#CR">CR</a> + <a href="blcksock.html#LF">LF</a>;</code></td>
398</tr>
399</table>
400&nbsp;<table class="detail">
401<tr class="list">
402<td class="itemcode"><a name="c64k"></a><code><b>c64k</b> = 65536;</code></td>
403</tr>
404</table>
405&nbsp;<h3 class="detail">Variables</h3>
406<table class="detail">
407<tr class="list">
408<td class="itemcode"><a name="SSLImplementation"></a><code><b>SSLImplementation</b>: <a href="blcksock.html#TSSLClass">TSSLClass</a> = <a href="blcksock.TSSLNone.html">TSSLNone</a>;</code></td>
409</tr>
410</table>
411<p>
412Selected SSL plugin. Default is <a class="normal" href="blcksock.TSSLNone.html">TSSLNone</a>.
413
414<p>Do not change this value directly!!!
415
416<p>Just add your plugin unit to your project uses instead. Each plugin unit have initialization code what modify this variable.</p>
417<hr noshade size="1"><span class="appinfo"><em>Generated by <a target="_parent" href="http://pasdoc.sourceforge.net/">PasDoc 0.9.0</a> on 2012-04-23 21:38:50</em>
418</span>
419</body></html>
Note: See TracBrowser for help on using the repository browser.