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: Class TBlockSocket</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 | <a name="TBlockSocket"></a><h1 class="cio">Class TBlockSocket</h1>
|
---|
11 | <table class="sections">
|
---|
12 | <tr>
|
---|
13 | <td><a class="section" href="#@Description">Description</a></td><td><a class="section" href="#@Hierarchy">Hierarchy</a></td><td>Fields</td><td><a class="section" href="#@Methods">Methods</a></td><td><a class="section" href="#@Properties">Properties</a></td></tr></table>
|
---|
14 | <a name="@Description"></a><h2 class="unit">Unit</h2>
|
---|
15 | <p class="unitlink">
|
---|
16 | <a href="blcksock.html">blcksock</a></p>
|
---|
17 | <h2 class="declaration">Declaration</h2>
|
---|
18 | <p class="declaration">
|
---|
19 | <code>type TBlockSocket = class(TObject)</code></p>
|
---|
20 | <h2 class="description">Description</h2>
|
---|
21 | <p>
|
---|
22 | Basic IP object.</p>
|
---|
23 | <p>
|
---|
24 | This is parent class for other class with protocol implementations. Do not use this class directly! Use <a class="normal" href="blcksock.TICMPBlockSocket.html">TICMPBlockSocket</a>, <a class="normal" href="blcksock.TRAWBlockSocket.html">TRAWBlockSocket</a>, <a class="normal" href="blcksock.TTCPBlockSocket.html">TTCPBlockSocket</a> or <a class="normal" href="blcksock.TUDPBlockSocket.html">TUDPBlockSocket</a> instead.</p>
|
---|
25 | <a name="@Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
|
---|
26 | <ul class="hierarchy"><li class="ancestor">TObject</li>
|
---|
27 | <li class="thisitem">TBlockSocket</li></ul><h2 class="overview">Overview</h2>
|
---|
28 | <a name="@Methods"></a><h3 class="summary">Methods</h3>
|
---|
29 | <table class="summary">
|
---|
30 | <tr class="list">
|
---|
31 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
32 | <td class="itemcode"><code>constructor <b><a href="blcksock.TBlockSocket.html#Create">Create</a></b>;</code></td>
|
---|
33 | </tr>
|
---|
34 | <tr class="list2">
|
---|
35 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
36 | <td class="itemcode"><code>constructor <b><a href="blcksock.TBlockSocket.html#CreateAlternate">CreateAlternate</a></b>(Stub: string);</code></td>
|
---|
37 | </tr>
|
---|
38 | <tr class="list">
|
---|
39 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
40 | <td class="itemcode"><code>destructor <b><a href="blcksock.TBlockSocket.html#Destroy">Destroy</a></b>; override;</code></td>
|
---|
41 | </tr>
|
---|
42 | <tr class="list2">
|
---|
43 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
44 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#CreateSocket">CreateSocket</a></b>;</code></td>
|
---|
45 | </tr>
|
---|
46 | <tr class="list">
|
---|
47 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
48 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#CreateSocketByName">CreateSocketByName</a></b>(const Value: String);</code></td>
|
---|
49 | </tr>
|
---|
50 | <tr class="list2">
|
---|
51 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
52 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#CloseSocket">CloseSocket</a></b>; virtual;</code></td>
|
---|
53 | </tr>
|
---|
54 | <tr class="list">
|
---|
55 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
56 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#AbortSocket">AbortSocket</a></b>; virtual;</code></td>
|
---|
57 | </tr>
|
---|
58 | <tr class="list2">
|
---|
59 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
60 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#Bind">Bind</a></b>(IP, Port: string);</code></td>
|
---|
61 | </tr>
|
---|
62 | <tr class="list">
|
---|
63 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
64 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#Connect">Connect</a></b>(IP, Port: string); virtual;</code></td>
|
---|
65 | </tr>
|
---|
66 | <tr class="list2">
|
---|
67 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
68 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#Listen">Listen</a></b>; virtual;</code></td>
|
---|
69 | </tr>
|
---|
70 | <tr class="list">
|
---|
71 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
72 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#Accept">Accept</a></b>: TSocket; virtual;</code></td>
|
---|
73 | </tr>
|
---|
74 | <tr class="list2">
|
---|
75 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
76 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#SendBuffer">SendBuffer</a></b>(Buffer: Tmemory; Length: Integer): Integer; virtual;</code></td>
|
---|
77 | </tr>
|
---|
78 | <tr class="list">
|
---|
79 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
80 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SendByte">SendByte</a></b>(Data: Byte); virtual;</code></td>
|
---|
81 | </tr>
|
---|
82 | <tr class="list2">
|
---|
83 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
84 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SendString">SendString</a></b>(Data: AnsiString); virtual;</code></td>
|
---|
85 | </tr>
|
---|
86 | <tr class="list">
|
---|
87 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
88 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SendInteger">SendInteger</a></b>(Data: integer); virtual;</code></td>
|
---|
89 | </tr>
|
---|
90 | <tr class="list2">
|
---|
91 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
92 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SendBlock">SendBlock</a></b>(const Data: AnsiString); virtual;</code></td>
|
---|
93 | </tr>
|
---|
94 | <tr class="list">
|
---|
95 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
96 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SendStreamRaw">SendStreamRaw</a></b>(const Stream: TStream); virtual;</code></td>
|
---|
97 | </tr>
|
---|
98 | <tr class="list2">
|
---|
99 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
100 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SendStream">SendStream</a></b>(const Stream: TStream); virtual;</code></td>
|
---|
101 | </tr>
|
---|
102 | <tr class="list">
|
---|
103 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
104 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SendStreamIndy">SendStreamIndy</a></b>(const Stream: TStream); virtual;</code></td>
|
---|
105 | </tr>
|
---|
106 | <tr class="list2">
|
---|
107 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
108 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#RecvBuffer">RecvBuffer</a></b>(Buffer: TMemory; Length: Integer): Integer; virtual;</code></td>
|
---|
109 | </tr>
|
---|
110 | <tr class="list">
|
---|
111 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
112 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#RecvBufferEx">RecvBufferEx</a></b>(Buffer: Tmemory; Len: Integer; Timeout: Integer): Integer; virtual;</code></td>
|
---|
113 | </tr>
|
---|
114 | <tr class="list2">
|
---|
115 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
116 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#RecvBufferStr">RecvBufferStr</a></b>(Len: Integer; Timeout: Integer): AnsiString; virtual;</code></td>
|
---|
117 | </tr>
|
---|
118 | <tr class="list">
|
---|
119 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
120 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#RecvByte">RecvByte</a></b>(Timeout: Integer): Byte; virtual;</code></td>
|
---|
121 | </tr>
|
---|
122 | <tr class="list2">
|
---|
123 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
124 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#RecvInteger">RecvInteger</a></b>(Timeout: Integer): Integer; virtual;</code></td>
|
---|
125 | </tr>
|
---|
126 | <tr class="list">
|
---|
127 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
128 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#RecvString">RecvString</a></b>(Timeout: Integer): AnsiString; virtual;</code></td>
|
---|
129 | </tr>
|
---|
130 | <tr class="list2">
|
---|
131 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
132 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#RecvTerminated">RecvTerminated</a></b>(Timeout: Integer; const Terminator: AnsiString): AnsiString; virtual;</code></td>
|
---|
133 | </tr>
|
---|
134 | <tr class="list">
|
---|
135 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
136 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#RecvPacket">RecvPacket</a></b>(Timeout: Integer): AnsiString; virtual;</code></td>
|
---|
137 | </tr>
|
---|
138 | <tr class="list2">
|
---|
139 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
140 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#RecvBlock">RecvBlock</a></b>(Timeout: Integer): AnsiString; virtual;</code></td>
|
---|
141 | </tr>
|
---|
142 | <tr class="list">
|
---|
143 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
144 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#RecvStreamRaw">RecvStreamRaw</a></b>(const Stream: TStream; Timeout: Integer); virtual;</code></td>
|
---|
145 | </tr>
|
---|
146 | <tr class="list2">
|
---|
147 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
148 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#RecvStreamSize">RecvStreamSize</a></b>(const Stream: TStream; Timeout: Integer; Size: Integer);</code></td>
|
---|
149 | </tr>
|
---|
150 | <tr class="list">
|
---|
151 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
152 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#RecvStream">RecvStream</a></b>(const Stream: TStream; Timeout: Integer); virtual;</code></td>
|
---|
153 | </tr>
|
---|
154 | <tr class="list2">
|
---|
155 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
156 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#RecvStreamIndy">RecvStreamIndy</a></b>(const Stream: TStream; Timeout: Integer); virtual;</code></td>
|
---|
157 | </tr>
|
---|
158 | <tr class="list">
|
---|
159 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
160 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#PeekBuffer">PeekBuffer</a></b>(Buffer: TMemory; Length: Integer): Integer; virtual;</code></td>
|
---|
161 | </tr>
|
---|
162 | <tr class="list2">
|
---|
163 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
164 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#PeekByte">PeekByte</a></b>(Timeout: Integer): Byte; virtual;</code></td>
|
---|
165 | </tr>
|
---|
166 | <tr class="list">
|
---|
167 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
168 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#WaitingData">WaitingData</a></b>: Integer; virtual;</code></td>
|
---|
169 | </tr>
|
---|
170 | <tr class="list2">
|
---|
171 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
172 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#WaitingDataEx">WaitingDataEx</a></b>: Integer;</code></td>
|
---|
173 | </tr>
|
---|
174 | <tr class="list">
|
---|
175 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
176 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#Purge">Purge</a></b>;</code></td>
|
---|
177 | </tr>
|
---|
178 | <tr class="list2">
|
---|
179 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
180 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SetLinger">SetLinger</a></b>(Enable: Boolean; Linger: Integer);</code></td>
|
---|
181 | </tr>
|
---|
182 | <tr class="list">
|
---|
183 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
184 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#GetSinLocal">GetSinLocal</a></b>;</code></td>
|
---|
185 | </tr>
|
---|
186 | <tr class="list2">
|
---|
187 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
188 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#GetSinRemote">GetSinRemote</a></b>;</code></td>
|
---|
189 | </tr>
|
---|
190 | <tr class="list">
|
---|
191 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
192 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#GetSins">GetSins</a></b>;</code></td>
|
---|
193 | </tr>
|
---|
194 | <tr class="list2">
|
---|
195 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
196 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#ResetLastError">ResetLastError</a></b>;</code></td>
|
---|
197 | </tr>
|
---|
198 | <tr class="list">
|
---|
199 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
200 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#SockCheck">SockCheck</a></b>(SockResult: Integer): Integer; virtual;</code></td>
|
---|
201 | </tr>
|
---|
202 | <tr class="list2">
|
---|
203 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
204 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#ExceptCheck">ExceptCheck</a></b>;</code></td>
|
---|
205 | </tr>
|
---|
206 | <tr class="list">
|
---|
207 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
208 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#LocalName">LocalName</a></b>: string;</code></td>
|
---|
209 | </tr>
|
---|
210 | <tr class="list2">
|
---|
211 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
212 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#ResolveNameToIP">ResolveNameToIP</a></b>(Name: string; const IPList: TStrings);</code></td>
|
---|
213 | </tr>
|
---|
214 | <tr class="list">
|
---|
215 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
216 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#ResolveName">ResolveName</a></b>(Name: string): string;</code></td>
|
---|
217 | </tr>
|
---|
218 | <tr class="list2">
|
---|
219 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
220 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#ResolveIPToName">ResolveIPToName</a></b>(IP: string): string;</code></td>
|
---|
221 | </tr>
|
---|
222 | <tr class="list">
|
---|
223 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
224 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#ResolvePort">ResolvePort</a></b>(Port: string): Word;</code></td>
|
---|
225 | </tr>
|
---|
226 | <tr class="list2">
|
---|
227 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
228 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SetRemoteSin">SetRemoteSin</a></b>(IP, Port: string);</code></td>
|
---|
229 | </tr>
|
---|
230 | <tr class="list">
|
---|
231 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
232 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#GetLocalSinIP">GetLocalSinIP</a></b>: string; virtual;</code></td>
|
---|
233 | </tr>
|
---|
234 | <tr class="list2">
|
---|
235 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
236 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#GetRemoteSinIP">GetRemoteSinIP</a></b>: string; virtual;</code></td>
|
---|
237 | </tr>
|
---|
238 | <tr class="list">
|
---|
239 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
240 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#GetLocalSinPort">GetLocalSinPort</a></b>: Integer; virtual;</code></td>
|
---|
241 | </tr>
|
---|
242 | <tr class="list2">
|
---|
243 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
244 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#GetRemoteSinPort">GetRemoteSinPort</a></b>: Integer; virtual;</code></td>
|
---|
245 | </tr>
|
---|
246 | <tr class="list">
|
---|
247 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
248 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#CanRead">CanRead</a></b>(Timeout: Integer): Boolean; virtual;</code></td>
|
---|
249 | </tr>
|
---|
250 | <tr class="list2">
|
---|
251 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
252 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#CanReadEx">CanReadEx</a></b>(Timeout: Integer): Boolean; virtual;</code></td>
|
---|
253 | </tr>
|
---|
254 | <tr class="list">
|
---|
255 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
256 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#CanWrite">CanWrite</a></b>(Timeout: Integer): Boolean; virtual;</code></td>
|
---|
257 | </tr>
|
---|
258 | <tr class="list2">
|
---|
259 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
260 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#SendBufferTo">SendBufferTo</a></b>(Buffer: TMemory; Length: Integer): Integer; virtual;</code></td>
|
---|
261 | </tr>
|
---|
262 | <tr class="list">
|
---|
263 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
264 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#RecvBufferFrom">RecvBufferFrom</a></b>(Buffer: TMemory; Length: Integer): Integer; virtual;</code></td>
|
---|
265 | </tr>
|
---|
266 | <tr class="list2">
|
---|
267 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
268 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#GroupCanRead">GroupCanRead</a></b>(const SocketList: TList; Timeout: Integer; const CanReadList: TList): Boolean;</code></td>
|
---|
269 | </tr>
|
---|
270 | <tr class="list">
|
---|
271 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
272 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#EnableReuse">EnableReuse</a></b>(Value: Boolean);</code></td>
|
---|
273 | </tr>
|
---|
274 | <tr class="list2">
|
---|
275 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
276 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SetTimeout">SetTimeout</a></b>(Timeout: Integer);</code></td>
|
---|
277 | </tr>
|
---|
278 | <tr class="list">
|
---|
279 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
280 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SetSendTimeout">SetSendTimeout</a></b>(Timeout: Integer);</code></td>
|
---|
281 | </tr>
|
---|
282 | <tr class="list2">
|
---|
283 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
284 | <td class="itemcode"><code>procedure <b><a href="blcksock.TBlockSocket.html#SetRecvTimeout">SetRecvTimeout</a></b>(Timeout: Integer);</code></td>
|
---|
285 | </tr>
|
---|
286 | <tr class="list">
|
---|
287 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
288 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#GetSocketType">GetSocketType</a></b>: integer; Virtual;</code></td>
|
---|
289 | </tr>
|
---|
290 | <tr class="list2">
|
---|
291 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
292 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#GetSocketProtocol">GetSocketProtocol</a></b>: integer; Virtual;</code></td>
|
---|
293 | </tr>
|
---|
294 | <tr class="list">
|
---|
295 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
296 | <td class="itemcode"><code>class function <b><a href="blcksock.TBlockSocket.html#GetErrorDesc">GetErrorDesc</a></b>(ErrorCode: Integer): string;</code></td>
|
---|
297 | </tr>
|
---|
298 | <tr class="list2">
|
---|
299 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
300 | <td class="itemcode"><code>function <b><a href="blcksock.TBlockSocket.html#GetErrorDescEx">GetErrorDescEx</a></b>: string; virtual;</code></td>
|
---|
301 | </tr>
|
---|
302 | </table>
|
---|
303 | <a name="@Properties"></a><h3 class="summary">Properties</h3>
|
---|
304 | <table class="summary">
|
---|
305 | <tr class="list">
|
---|
306 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
307 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#WSAData">WSAData</a></b>: TWSADATA read GetWsaData;</code></td>
|
---|
308 | </tr>
|
---|
309 | <tr class="list2">
|
---|
310 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
311 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#FDset">FDset</a></b>: TFDSet read FFDset;</code></td>
|
---|
312 | </tr>
|
---|
313 | <tr class="list">
|
---|
314 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
315 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#LocalSin">LocalSin</a></b>: TVarSin read FLocalSin write FLocalSin;</code></td>
|
---|
316 | </tr>
|
---|
317 | <tr class="list2">
|
---|
318 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
319 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#RemoteSin">RemoteSin</a></b>: TVarSin read FRemoteSin write FRemoteSin;</code></td>
|
---|
320 | </tr>
|
---|
321 | <tr class="list">
|
---|
322 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
323 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#Socket">Socket</a></b>: TSocket read FSocket write SetSocket;</code></td>
|
---|
324 | </tr>
|
---|
325 | <tr class="list2">
|
---|
326 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
327 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#LastError">LastError</a></b>: Integer read FLastError;</code></td>
|
---|
328 | </tr>
|
---|
329 | <tr class="list">
|
---|
330 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
331 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#LastErrorDesc">LastErrorDesc</a></b>: string read FLastErrorDesc;</code></td>
|
---|
332 | </tr>
|
---|
333 | <tr class="list2">
|
---|
334 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
335 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a></b>: AnsiString read FBuffer write FBuffer;</code></td>
|
---|
336 | </tr>
|
---|
337 | <tr class="list">
|
---|
338 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
339 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#SizeRecvBuffer">SizeRecvBuffer</a></b>: Integer read GetSizeRecvBuffer write SetSizeRecvBuffer;</code></td>
|
---|
340 | </tr>
|
---|
341 | <tr class="list2">
|
---|
342 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
343 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#SizeSendBuffer">SizeSendBuffer</a></b>: Integer read GetSizeSendBuffer write SetSizeSendBuffer;</code></td>
|
---|
344 | </tr>
|
---|
345 | <tr class="list">
|
---|
346 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
347 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#NonBlockMode">NonBlockMode</a></b>: Boolean read FNonBlockMode Write SetNonBlockMode;</code></td>
|
---|
348 | </tr>
|
---|
349 | <tr class="list2">
|
---|
350 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
351 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#TTL">TTL</a></b>: Integer read GetTTL Write SetTTL;</code></td>
|
---|
352 | </tr>
|
---|
353 | <tr class="list">
|
---|
354 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
355 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#IP6used">IP6used</a></b>: Boolean read FIP6used;</code></td>
|
---|
356 | </tr>
|
---|
357 | <tr class="list2">
|
---|
358 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
359 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#RecvCounter">RecvCounter</a></b>: Integer read FRecvCounter;</code></td>
|
---|
360 | </tr>
|
---|
361 | <tr class="list">
|
---|
362 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
363 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#SendCounter">SendCounter</a></b>: Integer read FSendCounter;</code></td>
|
---|
364 | </tr>
|
---|
365 | <tr class="list2">
|
---|
366 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
367 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#Tag">Tag</a></b>: Integer read FTag write FTag;</code></td>
|
---|
368 | </tr>
|
---|
369 | <tr class="list">
|
---|
370 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
371 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#RaiseExcept">RaiseExcept</a></b>: Boolean read FRaiseExcept write FRaiseExcept;</code></td>
|
---|
372 | </tr>
|
---|
373 | <tr class="list2">
|
---|
374 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
375 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#MaxLineLength">MaxLineLength</a></b>: Integer read FMaxLineLength Write FMaxLineLength;</code></td>
|
---|
376 | </tr>
|
---|
377 | <tr class="list">
|
---|
378 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
379 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#MaxSendBandwidth">MaxSendBandwidth</a></b>: Integer read FMaxSendBandwidth Write FMaxSendBandwidth;</code></td>
|
---|
380 | </tr>
|
---|
381 | <tr class="list2">
|
---|
382 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
383 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#MaxRecvBandwidth">MaxRecvBandwidth</a></b>: Integer read FMaxRecvBandwidth Write FMaxRecvBandwidth;</code></td>
|
---|
384 | </tr>
|
---|
385 | <tr class="list">
|
---|
386 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
387 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#MaxBandwidth">MaxBandwidth</a></b>: Integer Write SetBandwidth;</code></td>
|
---|
388 | </tr>
|
---|
389 | <tr class="list2">
|
---|
390 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
391 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#ConvertLineEnd">ConvertLineEnd</a></b>: Boolean read FConvertLineEnd Write FConvertLineEnd;</code></td>
|
---|
392 | </tr>
|
---|
393 | <tr class="list">
|
---|
394 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
395 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#Family">Family</a></b>: <a href="blcksock.html#TSocketFamily">TSocketFamily</a> read FFamily Write SetFamily;</code></td>
|
---|
396 | </tr>
|
---|
397 | <tr class="list2">
|
---|
398 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
399 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#PreferIP4">PreferIP4</a></b>: Boolean read FPreferIP4 Write FPreferIP4;</code></td>
|
---|
400 | </tr>
|
---|
401 | <tr class="list">
|
---|
402 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
403 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#InterPacketTimeout">InterPacketTimeout</a></b>: Boolean read FInterPacketTimeout Write FInterPacketTimeout;</code></td>
|
---|
404 | </tr>
|
---|
405 | <tr class="list2">
|
---|
406 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
407 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#SendMaxChunk">SendMaxChunk</a></b>: Integer read FSendMaxChunk Write FSendMaxChunk;</code></td>
|
---|
408 | </tr>
|
---|
409 | <tr class="list">
|
---|
410 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
411 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#StopFlag">StopFlag</a></b>: Boolean read FStopFlag Write FStopFlag;</code></td>
|
---|
412 | </tr>
|
---|
413 | <tr class="list2">
|
---|
414 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
415 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#NonblockSendTimeout">NonblockSendTimeout</a></b>: Integer read FNonblockSendTimeout Write FNonblockSendTimeout;</code></td>
|
---|
416 | </tr>
|
---|
417 | <tr class="list">
|
---|
418 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
419 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#OnStatus">OnStatus</a></b>: <a href="blcksock.html#THookSocketStatus">THookSocketStatus</a> read FOnStatus write FOnStatus;</code></td>
|
---|
420 | </tr>
|
---|
421 | <tr class="list2">
|
---|
422 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
423 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#OnReadFilter">OnReadFilter</a></b>: <a href="blcksock.html#THookDataFilter">THookDataFilter</a> read FOnReadFilter write FOnReadFilter;</code></td>
|
---|
424 | </tr>
|
---|
425 | <tr class="list">
|
---|
426 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
427 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#OnCreateSocket">OnCreateSocket</a></b>: <a href="blcksock.html#THookCreateSocket">THookCreateSocket</a> read FOnCreateSocket write FOnCreateSocket;</code></td>
|
---|
428 | </tr>
|
---|
429 | <tr class="list2">
|
---|
430 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
431 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#OnMonitor">OnMonitor</a></b>: <a href="blcksock.html#THookMonitor">THookMonitor</a> read FOnMonitor write FOnMonitor;</code></td>
|
---|
432 | </tr>
|
---|
433 | <tr class="list">
|
---|
434 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
435 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#OnHeartbeat">OnHeartbeat</a></b>: <a href="blcksock.html#THookHeartbeat">THookHeartbeat</a> read FOnHeartbeat write FOnHeartbeat;</code></td>
|
---|
436 | </tr>
|
---|
437 | <tr class="list2">
|
---|
438 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
439 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#HeartbeatRate">HeartbeatRate</a></b>: integer read FHeartbeatRate Write FHeartbeatRate;</code></td>
|
---|
440 | </tr>
|
---|
441 | <tr class="list">
|
---|
442 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
443 | <td class="itemcode"><code>property <b><a href="blcksock.TBlockSocket.html#Owner">Owner</a></b>: TObject read FOwner Write FOwner;</code></td>
|
---|
444 | </tr>
|
---|
445 | </table>
|
---|
446 | <h2 class="description">Description</h2>
|
---|
447 | <h3 class="detail">Methods</h3>
|
---|
448 | <table class="detail">
|
---|
449 | <tr class="list">
|
---|
450 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
451 | <td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>;</code></td>
|
---|
452 | </tr>
|
---|
453 | </table>
|
---|
454 | <table class="detail">
|
---|
455 | <tr class="list">
|
---|
456 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
457 | <td class="itemcode"><a name="CreateAlternate"></a><code>constructor <b>CreateAlternate</b>(Stub: string);</code></td>
|
---|
458 | </tr>
|
---|
459 | </table>
|
---|
460 | <p>
|
---|
461 | Create object and load all necessary socket library. What library is loaded is described by STUB parameter. If STUB is empty string, then is loaded default libraries.</p>
|
---|
462 | <table class="detail">
|
---|
463 | <tr class="list">
|
---|
464 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
465 | <td class="itemcode"><a name="Destroy"></a><code>destructor <b>Destroy</b>; override;</code></td>
|
---|
466 | </tr>
|
---|
467 | </table>
|
---|
468 | <table class="detail">
|
---|
469 | <tr class="list">
|
---|
470 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
471 | <td class="itemcode"><a name="CreateSocket"></a><code>procedure <b>CreateSocket</b>;</code></td>
|
---|
472 | </tr>
|
---|
473 | </table>
|
---|
474 | <p>
|
---|
475 | If <a class="normal" href="blcksock.TBlockSocket.html#Family">Family</a> is not SF_Any, then create socket with type defined in <a class="normal" href="blcksock.TBlockSocket.html#Family">Family</a> property. If family is SF_Any, then do nothing! (socket is created automaticly when you know what type of socket you need to create. (i.e. inside <a class="normal" href="blcksock.TBlockSocket.html#Connect">Connect</a> or <a class="normal" href="blcksock.TBlockSocket.html#Bind">Bind</a> call.) When socket is created, then is aplyed all stored delayed socket options.</p>
|
---|
476 | <table class="detail">
|
---|
477 | <tr class="list">
|
---|
478 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
479 | <td class="itemcode"><a name="CreateSocketByName"></a><code>procedure <b>CreateSocketByName</b>(const Value: String);</code></td>
|
---|
480 | </tr>
|
---|
481 | </table>
|
---|
482 | <p>
|
---|
483 | It create socket. Address resolving of Value tells what type of socket is created. If Value is resolved as IPv4 IP, then is created IPv4 socket. If value is resolved as IPv6 address, then is created IPv6 socket.</p>
|
---|
484 | <table class="detail">
|
---|
485 | <tr class="list">
|
---|
486 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
487 | <td class="itemcode"><a name="CloseSocket"></a><code>procedure <b>CloseSocket</b>; virtual;</code></td>
|
---|
488 | </tr>
|
---|
489 | </table>
|
---|
490 | <p>
|
---|
491 | Destroy socket in use. This method is also automatically called from object destructor.</p>
|
---|
492 | <table class="detail">
|
---|
493 | <tr class="list">
|
---|
494 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
495 | <td class="itemcode"><a name="AbortSocket"></a><code>procedure <b>AbortSocket</b>; virtual;</code></td>
|
---|
496 | </tr>
|
---|
497 | </table>
|
---|
498 | <p>
|
---|
499 | Abort any work on Socket and destroy them.</p>
|
---|
500 | <table class="detail">
|
---|
501 | <tr class="list">
|
---|
502 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
503 | <td class="itemcode"><a name="Bind"></a><code>procedure <b>Bind</b>(IP, Port: string);</code></td>
|
---|
504 | </tr>
|
---|
505 | </table>
|
---|
506 | <p>
|
---|
507 | Connects socket to local IP address and PORT. IP address may be numeric or symbolic ('192.168.74.50', 'cosi.nekde.cz', 'ff08::1'). The same for PORT - it may be number or mnemonic port ('23', 'telnet').
|
---|
508 |
|
---|
509 | <p>If port value is '0', system chooses itself and conects unused port in the range 1024 to 4096 (this depending by operating system!). Structure LocalSin is filled after calling this method.
|
---|
510 |
|
---|
511 | <p>Note: If you call this on non-created socket, then socket is created automaticly.
|
---|
512 |
|
---|
513 | <p>Warning: when you call : Bind('0.0.0.0','0'); then is nothing done! In this case is used implicit system bind instead.</p>
|
---|
514 | <table class="detail">
|
---|
515 | <tr class="list">
|
---|
516 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
517 | <td class="itemcode"><a name="Connect"></a><code>procedure <b>Connect</b>(IP, Port: string); virtual;</code></td>
|
---|
518 | </tr>
|
---|
519 | </table>
|
---|
520 | <p>
|
---|
521 | Connects socket to remote IP address and PORT. The same rules as with <a class="normal" href="blcksock.TBlockSocket.html#Bind">Bind</a> method are valid. The only exception is that PORT with 0 value will not be connected!
|
---|
522 |
|
---|
523 | <p>Structures LocalSin and RemoteSin will be filled with valid values.
|
---|
524 |
|
---|
525 | <p>When you call this on non-created socket, then socket is created automaticly. Type of created socket is by <a class="normal" href="blcksock.TBlockSocket.html#Family">Family</a> property. If is used SF_IP4, then is created socket for IPv4. If is used SF_IP6, then is created socket for IPv6. When you have family on SF_Any (default!), then type of created socket is determined by address resolving of destination address. (Not work properly on prilimitary winsock IPv6 support!)</p>
|
---|
526 | <table class="detail">
|
---|
527 | <tr class="list">
|
---|
528 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
529 | <td class="itemcode"><a name="Listen"></a><code>procedure <b>Listen</b>; virtual;</code></td>
|
---|
530 | </tr>
|
---|
531 | </table>
|
---|
532 | <p>
|
---|
533 | Sets socket to receive mode for new incoming connections. It is necessary to use <a class="normal" href="blcksock.TBlockSocket.html">TBlockSocket</a>.<a class="normal" href="blcksock.TBlockSocket.html#Bind">Bind</a> function call before this method to select receiving port!</p>
|
---|
534 | <table class="detail">
|
---|
535 | <tr class="list">
|
---|
536 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
537 | <td class="itemcode"><a name="Accept"></a><code>function <b>Accept</b>: TSocket; virtual;</code></td>
|
---|
538 | </tr>
|
---|
539 | </table>
|
---|
540 | <p>
|
---|
541 | Waits until new incoming connection comes. After it comes a new socket is automatically created (socket handler is returned by this function as result).</p>
|
---|
542 | <table class="detail">
|
---|
543 | <tr class="list">
|
---|
544 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
545 | <td class="itemcode"><a name="SendBuffer"></a><code>function <b>SendBuffer</b>(Buffer: Tmemory; Length: Integer): Integer; virtual;</code></td>
|
---|
546 | </tr>
|
---|
547 | </table>
|
---|
548 | <p>
|
---|
549 | Sends data of LENGTH from BUFFER address via connected socket. System automatically splits data to packets.</p>
|
---|
550 | <table class="detail">
|
---|
551 | <tr class="list">
|
---|
552 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
553 | <td class="itemcode"><a name="SendByte"></a><code>procedure <b>SendByte</b>(Data: Byte); virtual;</code></td>
|
---|
554 | </tr>
|
---|
555 | </table>
|
---|
556 | <p>
|
---|
557 | One data BYTE is sent via connected socket.</p>
|
---|
558 | <table class="detail">
|
---|
559 | <tr class="list">
|
---|
560 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
561 | <td class="itemcode"><a name="SendString"></a><code>procedure <b>SendString</b>(Data: AnsiString); virtual;</code></td>
|
---|
562 | </tr>
|
---|
563 | </table>
|
---|
564 | <p>
|
---|
565 | Send data string via connected socket. Any terminator is not added! If you need send true string with CR-LF termination, you must add CR-LF characters to sended string! Because any termination is not added automaticly, you can use this function for sending any binary data in binary string.</p>
|
---|
566 | <table class="detail">
|
---|
567 | <tr class="list">
|
---|
568 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
569 | <td class="itemcode"><a name="SendInteger"></a><code>procedure <b>SendInteger</b>(Data: integer); virtual;</code></td>
|
---|
570 | </tr>
|
---|
571 | </table>
|
---|
572 | <p>
|
---|
573 | Send integer as four bytes to socket.</p>
|
---|
574 | <table class="detail">
|
---|
575 | <tr class="list">
|
---|
576 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
577 | <td class="itemcode"><a name="SendBlock"></a><code>procedure <b>SendBlock</b>(const Data: AnsiString); virtual;</code></td>
|
---|
578 | </tr>
|
---|
579 | </table>
|
---|
580 | <p>
|
---|
581 | Send data as one block to socket. Each block begin with 4 bytes with length of data in block. This 4 bytes is added automaticly by this function.</p>
|
---|
582 | <table class="detail">
|
---|
583 | <tr class="list">
|
---|
584 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
585 | <td class="itemcode"><a name="SendStreamRaw"></a><code>procedure <b>SendStreamRaw</b>(const Stream: TStream); virtual;</code></td>
|
---|
586 | </tr>
|
---|
587 | </table>
|
---|
588 | <p>
|
---|
589 | Send data from stream to socket.</p>
|
---|
590 | <table class="detail">
|
---|
591 | <tr class="list">
|
---|
592 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
593 | <td class="itemcode"><a name="SendStream"></a><code>procedure <b>SendStream</b>(const Stream: TStream); virtual;</code></td>
|
---|
594 | </tr>
|
---|
595 | </table>
|
---|
596 | <p>
|
---|
597 | Send content of stream to socket. It using <a class="normal" href="blcksock.TBlockSocket.html#SendBlock">SendBlock</a> method</p>
|
---|
598 | <table class="detail">
|
---|
599 | <tr class="list">
|
---|
600 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
601 | <td class="itemcode"><a name="SendStreamIndy"></a><code>procedure <b>SendStreamIndy</b>(const Stream: TStream); virtual;</code></td>
|
---|
602 | </tr>
|
---|
603 | </table>
|
---|
604 | <p>
|
---|
605 | Send content of stream to socket. It using <a class="normal" href="blcksock.TBlockSocket.html#SendBlock">SendBlock</a> method and this is compatible with streams in Indy library.</p>
|
---|
606 | <table class="detail">
|
---|
607 | <tr class="list">
|
---|
608 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
609 | <td class="itemcode"><a name="RecvBuffer"></a><code>function <b>RecvBuffer</b>(Buffer: TMemory; Length: Integer): Integer; virtual;</code></td>
|
---|
610 | </tr>
|
---|
611 | </table>
|
---|
612 | <p>
|
---|
613 | Note: This is low-level receive function. You must be sure if data is waiting for read before call this function for avoid deadlock!
|
---|
614 |
|
---|
615 | <p>Waits until allocated buffer is filled by received data. Returns number of data received, which equals to LENGTH value under normal operation. If it is not equal the communication channel is possibly broken.
|
---|
616 |
|
---|
617 | <p>On stream oriented sockets if is received 0 bytes, it mean 'socket is closed!"
|
---|
618 |
|
---|
619 | <p>On datagram socket is readed first waiting datagram.</p>
|
---|
620 | <table class="detail">
|
---|
621 | <tr class="list">
|
---|
622 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
623 | <td class="itemcode"><a name="RecvBufferEx"></a><code>function <b>RecvBufferEx</b>(Buffer: Tmemory; Len: Integer; Timeout: Integer): Integer; virtual;</code></td>
|
---|
624 | </tr>
|
---|
625 | </table>
|
---|
626 | <p>
|
---|
627 | Note: This is high-level receive function. It using internal <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a> and you can combine this function freely with other high-level functions!
|
---|
628 |
|
---|
629 | <p>Method waits until data is received. If no data is received within TIMEOUT (in milliseconds) period, <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a> is set to WSAETIMEDOUT. Methods serves for reading any size of data (i.e. one megabyte...). This method is preffered for reading from stream sockets (like TCP).</p>
|
---|
630 | <table class="detail">
|
---|
631 | <tr class="list">
|
---|
632 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
633 | <td class="itemcode"><a name="RecvBufferStr"></a><code>function <b>RecvBufferStr</b>(Len: Integer; Timeout: Integer): AnsiString; virtual;</code></td>
|
---|
634 | </tr>
|
---|
635 | </table>
|
---|
636 | <p>
|
---|
637 | Similar to <a class="normal" href="blcksock.TBlockSocket.html#RecvBufferEx">RecvBufferEx</a>, but readed data is stored in binary string, not in memory buffer.</p>
|
---|
638 | <table class="detail">
|
---|
639 | <tr class="list">
|
---|
640 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
641 | <td class="itemcode"><a name="RecvByte"></a><code>function <b>RecvByte</b>(Timeout: Integer): Byte; virtual;</code></td>
|
---|
642 | </tr>
|
---|
643 | </table>
|
---|
644 | <p>
|
---|
645 | Note: This is high-level receive function. It using internal <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a> and you can combine this function freely with other high-level functions.
|
---|
646 |
|
---|
647 | <p>Waits until one data byte is received which is also returned as function result. If no data is received within TIMEOUT (in milliseconds)period, <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a> is set to WSAETIMEDOUT and result have value 0.</p>
|
---|
648 | <table class="detail">
|
---|
649 | <tr class="list">
|
---|
650 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
651 | <td class="itemcode"><a name="RecvInteger"></a><code>function <b>RecvInteger</b>(Timeout: Integer): Integer; virtual;</code></td>
|
---|
652 | </tr>
|
---|
653 | </table>
|
---|
654 | <p>
|
---|
655 | Note: This is high-level receive function. It using internal <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a> and you can combine this function freely with other high-level functions.
|
---|
656 |
|
---|
657 | <p>Waits until one four bytes are received and return it as one Ineger Value. If no data is received within TIMEOUT (in milliseconds)period, <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a> is set to WSAETIMEDOUT and result have value 0.</p>
|
---|
658 | <table class="detail">
|
---|
659 | <tr class="list">
|
---|
660 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
661 | <td class="itemcode"><a name="RecvString"></a><code>function <b>RecvString</b>(Timeout: Integer): AnsiString; virtual;</code></td>
|
---|
662 | </tr>
|
---|
663 | </table>
|
---|
664 | <p>
|
---|
665 | Note: This is high-level receive function. It using internal <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a> and you can combine this function freely with other high-level functions.
|
---|
666 |
|
---|
667 | <p>Method waits until data string is received. This string is terminated by CR-LF characters. The resulting string is returned without this termination (CR-LF)! If <a class="normal" href="blcksock.TBlockSocket.html#ConvertLineEnd">ConvertLineEnd</a> is used, then CR-LF sequence may not be exactly CR-LF. See <a class="normal" href="blcksock.TBlockSocket.html#ConvertLineEnd">ConvertLineEnd</a> description. If no data is received within TIMEOUT (in milliseconds) period, <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a> is set to WSAETIMEDOUT. You may also specify maximum length of reading data by <a class="normal" href="blcksock.TBlockSocket.html#MaxLineLength">MaxLineLength</a> property.</p>
|
---|
668 | <table class="detail">
|
---|
669 | <tr class="list">
|
---|
670 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
671 | <td class="itemcode"><a name="RecvTerminated"></a><code>function <b>RecvTerminated</b>(Timeout: Integer; const Terminator: AnsiString): AnsiString; virtual;</code></td>
|
---|
672 | </tr>
|
---|
673 | </table>
|
---|
674 | <p>
|
---|
675 | Note: This is high-level receive function. It using internal <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a> and you can combine this function freely with other high-level functions.
|
---|
676 |
|
---|
677 | <p>Method waits until data string is received. This string is terminated by Terminator string. The resulting string is returned without this termination. If no data is received within TIMEOUT (in milliseconds) period, <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a> is set to WSAETIMEDOUT. You may also specify maximum length of reading data by <a class="normal" href="blcksock.TBlockSocket.html#MaxLineLength">MaxLineLength</a> property.</p>
|
---|
678 | <table class="detail">
|
---|
679 | <tr class="list">
|
---|
680 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
681 | <td class="itemcode"><a name="RecvPacket"></a><code>function <b>RecvPacket</b>(Timeout: Integer): AnsiString; virtual;</code></td>
|
---|
682 | </tr>
|
---|
683 | </table>
|
---|
684 | <p>
|
---|
685 | Note: This is high-level receive function. It using internal <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a> and you can combine this function freely with other high-level functions.
|
---|
686 |
|
---|
687 | <p>Method reads all data waiting for read. If no data is received within TIMEOUT (in milliseconds) period, <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a> is set to WSAETIMEDOUT. Methods serves for reading unknown size of data. Because before call this function you don't know size of received data, returned data is stored in dynamic size binary string. This method is preffered for reading from stream sockets (like TCP). It is very goot for receiving datagrams too! (UDP protocol)</p>
|
---|
688 | <table class="detail">
|
---|
689 | <tr class="list">
|
---|
690 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
691 | <td class="itemcode"><a name="RecvBlock"></a><code>function <b>RecvBlock</b>(Timeout: Integer): AnsiString; virtual;</code></td>
|
---|
692 | </tr>
|
---|
693 | </table>
|
---|
694 | <p>
|
---|
695 | Read one block of data from socket. Each block begin with 4 bytes with length of data in block. This function read first 4 bytes for get lenght, then it wait for reported count of bytes.</p>
|
---|
696 | <table class="detail">
|
---|
697 | <tr class="list">
|
---|
698 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
699 | <td class="itemcode"><a name="RecvStreamRaw"></a><code>procedure <b>RecvStreamRaw</b>(const Stream: TStream; Timeout: Integer); virtual;</code></td>
|
---|
700 | </tr>
|
---|
701 | </table>
|
---|
702 | <p>
|
---|
703 | Read all data from socket to stream until socket is closed (or any error occured.)</p>
|
---|
704 | <table class="detail">
|
---|
705 | <tr class="list">
|
---|
706 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
707 | <td class="itemcode"><a name="RecvStreamSize"></a><code>procedure <b>RecvStreamSize</b>(const Stream: TStream; Timeout: Integer; Size: Integer);</code></td>
|
---|
708 | </tr>
|
---|
709 | </table>
|
---|
710 | <p>
|
---|
711 | Read requested count of bytes from socket to stream.</p>
|
---|
712 | <table class="detail">
|
---|
713 | <tr class="list">
|
---|
714 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
715 | <td class="itemcode"><a name="RecvStream"></a><code>procedure <b>RecvStream</b>(const Stream: TStream; Timeout: Integer); virtual;</code></td>
|
---|
716 | </tr>
|
---|
717 | </table>
|
---|
718 | <p>
|
---|
719 | Receive data to stream. It using <a class="normal" href="blcksock.TBlockSocket.html#RecvBlock">RecvBlock</a> method.</p>
|
---|
720 | <table class="detail">
|
---|
721 | <tr class="list">
|
---|
722 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
723 | <td class="itemcode"><a name="RecvStreamIndy"></a><code>procedure <b>RecvStreamIndy</b>(const Stream: TStream; Timeout: Integer); virtual;</code></td>
|
---|
724 | </tr>
|
---|
725 | </table>
|
---|
726 | <p>
|
---|
727 | Receive data to stream. This function is compatible with similar function in Indy library. It using <a class="normal" href="blcksock.TBlockSocket.html#RecvBlock">RecvBlock</a> method.</p>
|
---|
728 | <table class="detail">
|
---|
729 | <tr class="list">
|
---|
730 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
731 | <td class="itemcode"><a name="PeekBuffer"></a><code>function <b>PeekBuffer</b>(Buffer: TMemory; Length: Integer): Integer; virtual;</code></td>
|
---|
732 | </tr>
|
---|
733 | </table>
|
---|
734 | <p>
|
---|
735 | Same as <a class="normal" href="blcksock.TBlockSocket.html#RecvBuffer">RecvBuffer</a>, but readed data stays in system input buffer. Warning: this function not respect data in <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a>! Is not recommended to use this function!</p>
|
---|
736 | <table class="detail">
|
---|
737 | <tr class="list">
|
---|
738 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
739 | <td class="itemcode"><a name="PeekByte"></a><code>function <b>PeekByte</b>(Timeout: Integer): Byte; virtual;</code></td>
|
---|
740 | </tr>
|
---|
741 | </table>
|
---|
742 | <p>
|
---|
743 | Same as <a class="normal" href="blcksock.TBlockSocket.html#RecvByte">RecvByte</a>, but readed data stays in input system buffer. Warning: this function not respect data in <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a>! Is not recommended to use this function!</p>
|
---|
744 | <table class="detail">
|
---|
745 | <tr class="list">
|
---|
746 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
747 | <td class="itemcode"><a name="WaitingData"></a><code>function <b>WaitingData</b>: Integer; virtual;</code></td>
|
---|
748 | </tr>
|
---|
749 | </table>
|
---|
750 | <p>
|
---|
751 | On stream sockets it returns number of received bytes waiting for picking. 0 is returned when there is no such data. On datagram socket it returns length of the first waiting datagram. Returns 0 if no datagram is waiting.</p>
|
---|
752 | <table class="detail">
|
---|
753 | <tr class="list">
|
---|
754 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
755 | <td class="itemcode"><a name="WaitingDataEx"></a><code>function <b>WaitingDataEx</b>: Integer;</code></td>
|
---|
756 | </tr>
|
---|
757 | </table>
|
---|
758 | <p>
|
---|
759 | Same as <a class="normal" href="blcksock.TBlockSocket.html#WaitingData">WaitingData</a>, but if exists some of data in <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a>, return their length instead.</p>
|
---|
760 | <table class="detail">
|
---|
761 | <tr class="list">
|
---|
762 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
763 | <td class="itemcode"><a name="Purge"></a><code>procedure <b>Purge</b>;</code></td>
|
---|
764 | </tr>
|
---|
765 | </table>
|
---|
766 | <p>
|
---|
767 | Clear all waiting data for read from buffers.</p>
|
---|
768 | <table class="detail">
|
---|
769 | <tr class="list">
|
---|
770 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
771 | <td class="itemcode"><a name="SetLinger"></a><code>procedure <b>SetLinger</b>(Enable: Boolean; Linger: Integer);</code></td>
|
---|
772 | </tr>
|
---|
773 | </table>
|
---|
774 | <p>
|
---|
775 | Sets linger. Enabled linger means that the system waits another LINGER (in milliseconds) time for delivery of sent data. This function is only for stream type of socket! (TCP)</p>
|
---|
776 | <table class="detail">
|
---|
777 | <tr class="list">
|
---|
778 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
779 | <td class="itemcode"><a name="GetSinLocal"></a><code>procedure <b>GetSinLocal</b>;</code></td>
|
---|
780 | </tr>
|
---|
781 | </table>
|
---|
782 | <p>
|
---|
783 | Actualize values in <a class="normal" href="blcksock.TBlockSocket.html#LocalSin">LocalSin</a>.</p>
|
---|
784 | <table class="detail">
|
---|
785 | <tr class="list">
|
---|
786 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
787 | <td class="itemcode"><a name="GetSinRemote"></a><code>procedure <b>GetSinRemote</b>;</code></td>
|
---|
788 | </tr>
|
---|
789 | </table>
|
---|
790 | <p>
|
---|
791 | Actualize values in <a class="normal" href="blcksock.TBlockSocket.html#RemoteSin">RemoteSin</a>.</p>
|
---|
792 | <table class="detail">
|
---|
793 | <tr class="list">
|
---|
794 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
795 | <td class="itemcode"><a name="GetSins"></a><code>procedure <b>GetSins</b>;</code></td>
|
---|
796 | </tr>
|
---|
797 | </table>
|
---|
798 | <p>
|
---|
799 | Actualize values in <a class="normal" href="blcksock.TBlockSocket.html#LocalSin">LocalSin</a> and <a class="normal" href="blcksock.TBlockSocket.html#RemoteSin">RemoteSin</a>.</p>
|
---|
800 | <table class="detail">
|
---|
801 | <tr class="list">
|
---|
802 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
803 | <td class="itemcode"><a name="ResetLastError"></a><code>procedure <b>ResetLastError</b>;</code></td>
|
---|
804 | </tr>
|
---|
805 | </table>
|
---|
806 | <p>
|
---|
807 | Reset <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a> and <a class="normal" href="blcksock.TBlockSocket.html#LastErrorDesc">LastErrorDesc</a> to non-error state.</p>
|
---|
808 | <table class="detail">
|
---|
809 | <tr class="list">
|
---|
810 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
811 | <td class="itemcode"><a name="SockCheck"></a><code>function <b>SockCheck</b>(SockResult: Integer): Integer; virtual;</code></td>
|
---|
812 | </tr>
|
---|
813 | </table>
|
---|
814 | <p>
|
---|
815 | If you "manually" call Socket API functions, forward their return code as parameter to this function, which evaluates it, eventually calls GetLastError and found error code returns and stores to <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a>.</p>
|
---|
816 | <table class="detail">
|
---|
817 | <tr class="list">
|
---|
818 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
819 | <td class="itemcode"><a name="ExceptCheck"></a><code>procedure <b>ExceptCheck</b>;</code></td>
|
---|
820 | </tr>
|
---|
821 | </table>
|
---|
822 | <p>
|
---|
823 | If <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a> contains some error code and <a class="normal" href="blcksock.TBlockSocket.html#RaiseExcept">RaiseExcept</a> property is <code>True</code>, raise adequate exception.</p>
|
---|
824 | <table class="detail">
|
---|
825 | <tr class="list">
|
---|
826 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
827 | <td class="itemcode"><a name="LocalName"></a><code>function <b>LocalName</b>: string;</code></td>
|
---|
828 | </tr>
|
---|
829 | </table>
|
---|
830 | <p>
|
---|
831 | Returns local computer name as numerical or symbolic value. It try get fully qualified domain name. Name is returned in the format acceptable by functions demanding IP as input parameter.</p>
|
---|
832 | <table class="detail">
|
---|
833 | <tr class="list">
|
---|
834 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
835 | <td class="itemcode"><a name="ResolveNameToIP"></a><code>procedure <b>ResolveNameToIP</b>(Name: string; const IPList: TStrings);</code></td>
|
---|
836 | </tr>
|
---|
837 | </table>
|
---|
838 | <p>
|
---|
839 | Try resolve name to all possible IP address. i.e. If you pass as name result of <a class="normal" href="blcksock.TBlockSocket.html#LocalName">LocalName</a> method, you get all IP addresses used by local system.</p>
|
---|
840 | <table class="detail">
|
---|
841 | <tr class="list">
|
---|
842 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
843 | <td class="itemcode"><a name="ResolveName"></a><code>function <b>ResolveName</b>(Name: string): string;</code></td>
|
---|
844 | </tr>
|
---|
845 | </table>
|
---|
846 | <p>
|
---|
847 | Try resolve name to primary IP address. i.e. If you pass as name result of <a class="normal" href="blcksock.TBlockSocket.html#LocalName">LocalName</a> method, you get primary IP addresses used by local system.</p>
|
---|
848 | <table class="detail">
|
---|
849 | <tr class="list">
|
---|
850 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
851 | <td class="itemcode"><a name="ResolveIPToName"></a><code>function <b>ResolveIPToName</b>(IP: string): string;</code></td>
|
---|
852 | </tr>
|
---|
853 | </table>
|
---|
854 | <p>
|
---|
855 | Try resolve IP to their primary domain name. If IP not have domain name, then is returned original IP.</p>
|
---|
856 | <table class="detail">
|
---|
857 | <tr class="list">
|
---|
858 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
859 | <td class="itemcode"><a name="ResolvePort"></a><code>function <b>ResolvePort</b>(Port: string): Word;</code></td>
|
---|
860 | </tr>
|
---|
861 | </table>
|
---|
862 | <p>
|
---|
863 | Try resolve symbolic port name to port number. (i.e. 'Echo' to 8)</p>
|
---|
864 | <table class="detail">
|
---|
865 | <tr class="list">
|
---|
866 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
867 | <td class="itemcode"><a name="SetRemoteSin"></a><code>procedure <b>SetRemoteSin</b>(IP, Port: string);</code></td>
|
---|
868 | </tr>
|
---|
869 | </table>
|
---|
870 | <p>
|
---|
871 | Set information about remote side socket. It is good for seting remote side for sending UDP packet, etc.</p>
|
---|
872 | <table class="detail">
|
---|
873 | <tr class="list">
|
---|
874 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
875 | <td class="itemcode"><a name="GetLocalSinIP"></a><code>function <b>GetLocalSinIP</b>: string; virtual;</code></td>
|
---|
876 | </tr>
|
---|
877 | </table>
|
---|
878 | <p>
|
---|
879 | Picks IP socket address from <a class="normal" href="blcksock.TBlockSocket.html#LocalSin">LocalSin</a>.</p>
|
---|
880 | <table class="detail">
|
---|
881 | <tr class="list">
|
---|
882 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
883 | <td class="itemcode"><a name="GetRemoteSinIP"></a><code>function <b>GetRemoteSinIP</b>: string; virtual;</code></td>
|
---|
884 | </tr>
|
---|
885 | </table>
|
---|
886 | <p>
|
---|
887 | Picks IP socket address from <a class="normal" href="blcksock.TBlockSocket.html#RemoteSin">RemoteSin</a>.</p>
|
---|
888 | <table class="detail">
|
---|
889 | <tr class="list">
|
---|
890 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
891 | <td class="itemcode"><a name="GetLocalSinPort"></a><code>function <b>GetLocalSinPort</b>: Integer; virtual;</code></td>
|
---|
892 | </tr>
|
---|
893 | </table>
|
---|
894 | <p>
|
---|
895 | Picks socket PORT number from <a class="normal" href="blcksock.TBlockSocket.html#LocalSin">LocalSin</a>.</p>
|
---|
896 | <table class="detail">
|
---|
897 | <tr class="list">
|
---|
898 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
899 | <td class="itemcode"><a name="GetRemoteSinPort"></a><code>function <b>GetRemoteSinPort</b>: Integer; virtual;</code></td>
|
---|
900 | </tr>
|
---|
901 | </table>
|
---|
902 | <p>
|
---|
903 | Picks socket PORT number from <a class="normal" href="blcksock.TBlockSocket.html#RemoteSin">RemoteSin</a>.</p>
|
---|
904 | <table class="detail">
|
---|
905 | <tr class="list">
|
---|
906 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
907 | <td class="itemcode"><a name="CanRead"></a><code>function <b>CanRead</b>(Timeout: Integer): Boolean; virtual;</code></td>
|
---|
908 | </tr>
|
---|
909 | </table>
|
---|
910 | <p>
|
---|
911 | Return <code>True</code>, if you can read any data from socket or is incoming connection on TCP based socket. Status is tested for time Timeout (in milliseconds). If value in Timeout is 0, status is only tested and continue. If value in Timeout is -1, run is breaked and waiting for read data maybe forever.
|
---|
912 |
|
---|
913 | <p>This function is need only on special cases, when you need use <a class="normal" href="blcksock.TBlockSocket.html#RecvBuffer">RecvBuffer</a> function directly! read functioms what have timeout as calling parameter, calling this function internally.</p>
|
---|
914 | <table class="detail">
|
---|
915 | <tr class="list">
|
---|
916 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
917 | <td class="itemcode"><a name="CanReadEx"></a><code>function <b>CanReadEx</b>(Timeout: Integer): Boolean; virtual;</code></td>
|
---|
918 | </tr>
|
---|
919 | </table>
|
---|
920 | <p>
|
---|
921 | Same as <a class="normal" href="blcksock.TBlockSocket.html#CanRead">CanRead</a>, but additionally return <code>True</code> if is some data in <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a>.</p>
|
---|
922 | <table class="detail">
|
---|
923 | <tr class="list">
|
---|
924 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
925 | <td class="itemcode"><a name="CanWrite"></a><code>function <b>CanWrite</b>(Timeout: Integer): Boolean; virtual;</code></td>
|
---|
926 | </tr>
|
---|
927 | </table>
|
---|
928 | <p>
|
---|
929 | Return <code>True</code>, if you can to socket write any data (not full sending buffer). Status is tested for time Timeout (in milliseconds). If value in Timeout is 0, status is only tested and continue. If value in Timeout is -1, run is breaked and waiting for write data maybe forever.
|
---|
930 |
|
---|
931 | <p>This function is need only on special cases!</p>
|
---|
932 | <table class="detail">
|
---|
933 | <tr class="list">
|
---|
934 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
935 | <td class="itemcode"><a name="SendBufferTo"></a><code>function <b>SendBufferTo</b>(Buffer: TMemory; Length: Integer): Integer; virtual;</code></td>
|
---|
936 | </tr>
|
---|
937 | </table>
|
---|
938 | <p>
|
---|
939 | Same as <a class="normal" href="blcksock.TBlockSocket.html#SendBuffer">SendBuffer</a>, but send datagram to address from <a class="normal" href="blcksock.TBlockSocket.html#RemoteSin">RemoteSin</a>. Usefull for sending reply to datagram received by function <a class="normal" href="blcksock.TBlockSocket.html#RecvBufferFrom">RecvBufferFrom</a>.</p>
|
---|
940 | <table class="detail">
|
---|
941 | <tr class="list">
|
---|
942 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
943 | <td class="itemcode"><a name="RecvBufferFrom"></a><code>function <b>RecvBufferFrom</b>(Buffer: TMemory; Length: Integer): Integer; virtual;</code></td>
|
---|
944 | </tr>
|
---|
945 | </table>
|
---|
946 | <p>
|
---|
947 | Note: This is low-lever receive function. You must be sure if data is waiting for read before call this function for avoid deadlock!
|
---|
948 |
|
---|
949 | <p>Receives first waiting datagram to allocated buffer. If there is no waiting one, then waits until one comes. Returns length of datagram stored in BUFFER. If length exceeds buffer datagram is truncated. After this <a class="normal" href="blcksock.TBlockSocket.html#RemoteSin">RemoteSin</a> structure contains information about sender of UDP packet.</p>
|
---|
950 | <table class="detail">
|
---|
951 | <tr class="list">
|
---|
952 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
953 | <td class="itemcode"><a name="GroupCanRead"></a><code>function <b>GroupCanRead</b>(const SocketList: TList; Timeout: Integer; const CanReadList: TList): Boolean;</code></td>
|
---|
954 | </tr>
|
---|
955 | </table>
|
---|
956 | <p>
|
---|
957 | This function is for check for incoming data on set of sockets. Whitch sockets is checked is decribed by SocketList Tlist with TBlockSocket objects. TList may have maximal number of objects defined by FD_SETSIZE constant. Return <code>True</code>, if you can from some socket read any data or is incoming connection on TCP based socket. Status is tested for time Timeout (in milliseconds). If value in Timeout is 0, status is only tested and continue. If value in Timeout is -1, run is breaked and waiting for read data maybe forever. If is returned <code>True</code>, CanReadList TList is filled by all TBlockSocket objects what waiting for read.</p>
|
---|
958 | <table class="detail">
|
---|
959 | <tr class="list">
|
---|
960 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
961 | <td class="itemcode"><a name="EnableReuse"></a><code>procedure <b>EnableReuse</b>(Value: Boolean);</code></td>
|
---|
962 | </tr>
|
---|
963 | </table>
|
---|
964 | <p>
|
---|
965 | By this method you may turn address reuse mode for local <a class="normal" href="blcksock.TBlockSocket.html#Bind">Bind</a>. It is good specially for UDP protocol. Using this with TCP protocol is hazardous!</p>
|
---|
966 | <table class="detail">
|
---|
967 | <tr class="list">
|
---|
968 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
969 | <td class="itemcode"><a name="SetTimeout"></a><code>procedure <b>SetTimeout</b>(Timeout: Integer);</code></td>
|
---|
970 | </tr>
|
---|
971 | </table>
|
---|
972 | <p>
|
---|
973 | Try set timeout for all sending and receiving operations, if socket provider can do it. (It not supported by all socket providers!)</p>
|
---|
974 | <table class="detail">
|
---|
975 | <tr class="list">
|
---|
976 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
977 | <td class="itemcode"><a name="SetSendTimeout"></a><code>procedure <b>SetSendTimeout</b>(Timeout: Integer);</code></td>
|
---|
978 | </tr>
|
---|
979 | </table>
|
---|
980 | <p>
|
---|
981 | Try set timeout for all sending operations, if socket provider can do it. (It not supported by all socket providers!)</p>
|
---|
982 | <table class="detail">
|
---|
983 | <tr class="list">
|
---|
984 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
985 | <td class="itemcode"><a name="SetRecvTimeout"></a><code>procedure <b>SetRecvTimeout</b>(Timeout: Integer);</code></td>
|
---|
986 | </tr>
|
---|
987 | </table>
|
---|
988 | <p>
|
---|
989 | Try set timeout for all receiving operations, if socket provider can do it. (It not supported by all socket providers!)</p>
|
---|
990 | <table class="detail">
|
---|
991 | <tr class="list">
|
---|
992 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
993 | <td class="itemcode"><a name="GetSocketType"></a><code>function <b>GetSocketType</b>: integer; Virtual;</code></td>
|
---|
994 | </tr>
|
---|
995 | </table>
|
---|
996 | <p>
|
---|
997 | Return value of socket type.</p>
|
---|
998 | <table class="detail">
|
---|
999 | <tr class="list">
|
---|
1000 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1001 | <td class="itemcode"><a name="GetSocketProtocol"></a><code>function <b>GetSocketProtocol</b>: integer; Virtual;</code></td>
|
---|
1002 | </tr>
|
---|
1003 | </table>
|
---|
1004 | <p>
|
---|
1005 | Return value of protocol type for socket creation.</p>
|
---|
1006 | <table class="detail">
|
---|
1007 | <tr class="list">
|
---|
1008 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1009 | <td class="itemcode"><a name="GetErrorDesc"></a><code>class function <b>GetErrorDesc</b>(ErrorCode: Integer): string;</code></td>
|
---|
1010 | </tr>
|
---|
1011 | </table>
|
---|
1012 | <p>
|
---|
1013 | Return descriptive string for given error code. This is class function. You may call it without created object!</p>
|
---|
1014 | <table class="detail">
|
---|
1015 | <tr class="list">
|
---|
1016 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1017 | <td class="itemcode"><a name="GetErrorDescEx"></a><code>function <b>GetErrorDescEx</b>: string; virtual;</code></td>
|
---|
1018 | </tr>
|
---|
1019 | </table>
|
---|
1020 | <p>
|
---|
1021 | Return descriptive string for <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a>.</p>
|
---|
1022 | <h3 class="detail">Properties</h3>
|
---|
1023 | <table class="detail">
|
---|
1024 | <tr class="list">
|
---|
1025 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1026 | <td class="itemcode"><a name="WSAData"></a><code>property <b>WSAData</b>: TWSADATA read GetWsaData;</code></td>
|
---|
1027 | </tr>
|
---|
1028 | </table>
|
---|
1029 | <p>
|
---|
1030 | WSA structure with information about socket provider. On non-windows platforms this structure is simulated!</p>
|
---|
1031 | <table class="detail">
|
---|
1032 | <tr class="list">
|
---|
1033 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1034 | <td class="itemcode"><a name="FDset"></a><code>property <b>FDset</b>: TFDSet read FFDset;</code></td>
|
---|
1035 | </tr>
|
---|
1036 | </table>
|
---|
1037 | <p>
|
---|
1038 | FDset structure prepared for usage with this socket.</p>
|
---|
1039 | <table class="detail">
|
---|
1040 | <tr class="list">
|
---|
1041 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1042 | <td class="itemcode"><a name="LocalSin"></a><code>property <b>LocalSin</b>: TVarSin read FLocalSin write FLocalSin;</code></td>
|
---|
1043 | </tr>
|
---|
1044 | </table>
|
---|
1045 | <p>
|
---|
1046 | Structure describing local socket side.</p>
|
---|
1047 | <table class="detail">
|
---|
1048 | <tr class="list">
|
---|
1049 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1050 | <td class="itemcode"><a name="RemoteSin"></a><code>property <b>RemoteSin</b>: TVarSin read FRemoteSin write FRemoteSin;</code></td>
|
---|
1051 | </tr>
|
---|
1052 | </table>
|
---|
1053 | <p>
|
---|
1054 | Structure describing remote socket side.</p>
|
---|
1055 | <table class="detail">
|
---|
1056 | <tr class="list">
|
---|
1057 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1058 | <td class="itemcode"><a name="Socket"></a><code>property <b>Socket</b>: TSocket read FSocket write SetSocket;</code></td>
|
---|
1059 | </tr>
|
---|
1060 | </table>
|
---|
1061 | <p>
|
---|
1062 | Socket handler. Suitable for "manual" calls to socket API or manual connection of socket to a previously created socket (i.e by Accept method on TCP socket)</p>
|
---|
1063 | <table class="detail">
|
---|
1064 | <tr class="list">
|
---|
1065 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1066 | <td class="itemcode"><a name="LastError"></a><code>property <b>LastError</b>: Integer read FLastError;</code></td>
|
---|
1067 | </tr>
|
---|
1068 | </table>
|
---|
1069 | <p>
|
---|
1070 | Last socket operation error code. Error codes are described in socket documentation. Human readable error description is stored in <a class="normal" href="blcksock.TBlockSocket.html#LastErrorDesc">LastErrorDesc</a> property.</p>
|
---|
1071 | <table class="detail">
|
---|
1072 | <tr class="list">
|
---|
1073 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1074 | <td class="itemcode"><a name="LastErrorDesc"></a><code>property <b>LastErrorDesc</b>: string read FLastErrorDesc;</code></td>
|
---|
1075 | </tr>
|
---|
1076 | </table>
|
---|
1077 | <p>
|
---|
1078 | Human readable error description of <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a> code.</p>
|
---|
1079 | <table class="detail">
|
---|
1080 | <tr class="list">
|
---|
1081 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1082 | <td class="itemcode"><a name="LineBuffer"></a><code>property <b>LineBuffer</b>: AnsiString read FBuffer write FBuffer;</code></td>
|
---|
1083 | </tr>
|
---|
1084 | </table>
|
---|
1085 | <p>
|
---|
1086 | Buffer used by all high-level receiving functions. This buffer is used for optimized reading of data from socket. In normal cases you not need access to this buffer directly!</p>
|
---|
1087 | <table class="detail">
|
---|
1088 | <tr class="list">
|
---|
1089 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1090 | <td class="itemcode"><a name="SizeRecvBuffer"></a><code>property <b>SizeRecvBuffer</b>: Integer read GetSizeRecvBuffer write SetSizeRecvBuffer;</code></td>
|
---|
1091 | </tr>
|
---|
1092 | </table>
|
---|
1093 | <p>
|
---|
1094 | Size of Winsock receive buffer. If it is not supported by socket provider, it return as size one kilobyte.</p>
|
---|
1095 | <table class="detail">
|
---|
1096 | <tr class="list">
|
---|
1097 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1098 | <td class="itemcode"><a name="SizeSendBuffer"></a><code>property <b>SizeSendBuffer</b>: Integer read GetSizeSendBuffer write SetSizeSendBuffer;</code></td>
|
---|
1099 | </tr>
|
---|
1100 | </table>
|
---|
1101 | <p>
|
---|
1102 | Size of Winsock send buffer. If it is not supported by socket provider, it return as size one kilobyte.</p>
|
---|
1103 | <table class="detail">
|
---|
1104 | <tr class="list">
|
---|
1105 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1106 | <td class="itemcode"><a name="NonBlockMode"></a><code>property <b>NonBlockMode</b>: Boolean read FNonBlockMode Write SetNonBlockMode;</code></td>
|
---|
1107 | </tr>
|
---|
1108 | </table>
|
---|
1109 | <p>
|
---|
1110 | If <code>True</code>, turn class to non-blocking mode. Not all functions are working properly in this mode, you must know exactly what you are doing! However when you have big experience with non-blocking programming, then you can optimise your program by non-block mode!</p>
|
---|
1111 | <table class="detail">
|
---|
1112 | <tr class="list">
|
---|
1113 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1114 | <td class="itemcode"><a name="TTL"></a><code>property <b>TTL</b>: Integer read GetTTL Write SetTTL;</code></td>
|
---|
1115 | </tr>
|
---|
1116 | </table>
|
---|
1117 | <p>
|
---|
1118 | Set Time-to-live value. (if system supporting it!)</p>
|
---|
1119 | <table class="detail">
|
---|
1120 | <tr class="list">
|
---|
1121 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1122 | <td class="itemcode"><a name="IP6used"></a><code>property <b>IP6used</b>: Boolean read FIP6used;</code></td>
|
---|
1123 | </tr>
|
---|
1124 | </table>
|
---|
1125 | <p>
|
---|
1126 | If is <code>True</code>, then class in in IPv6 mode.</p>
|
---|
1127 | <table class="detail">
|
---|
1128 | <tr class="list">
|
---|
1129 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1130 | <td class="itemcode"><a name="RecvCounter"></a><code>property <b>RecvCounter</b>: Integer read FRecvCounter;</code></td>
|
---|
1131 | </tr>
|
---|
1132 | </table>
|
---|
1133 | <p>
|
---|
1134 | Return count of received bytes on this socket from begin of current connection.</p>
|
---|
1135 | <table class="detail">
|
---|
1136 | <tr class="list">
|
---|
1137 | <td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
|
---|
1138 | <td class="itemcode"><a name="SendCounter"></a><code>property <b>SendCounter</b>: Integer read FSendCounter;</code></td>
|
---|
1139 | </tr>
|
---|
1140 | </table>
|
---|
1141 | <p>
|
---|
1142 | Return count of sended bytes on this socket from begin of current connection.</p>
|
---|
1143 | <table class="detail">
|
---|
1144 | <tr class="list">
|
---|
1145 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1146 | <td class="itemcode"><a name="Tag"></a><code>property <b>Tag</b>: Integer read FTag write FTag;</code></td>
|
---|
1147 | </tr>
|
---|
1148 | </table>
|
---|
1149 | <p>
|
---|
1150 | this value is for free use.</p>
|
---|
1151 | <table class="detail">
|
---|
1152 | <tr class="list">
|
---|
1153 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1154 | <td class="itemcode"><a name="RaiseExcept"></a><code>property <b>RaiseExcept</b>: Boolean read FRaiseExcept write FRaiseExcept;</code></td>
|
---|
1155 | </tr>
|
---|
1156 | </table>
|
---|
1157 | <p>
|
---|
1158 | If <code>True</code>, winsock errors raises exception. Otherwise is setted <a class="normal" href="blcksock.TBlockSocket.html#LastError">LastError</a> value only and you must check it from your program! Default value is <code>False</code>.</p>
|
---|
1159 | <table class="detail">
|
---|
1160 | <tr class="list">
|
---|
1161 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1162 | <td class="itemcode"><a name="MaxLineLength"></a><code>property <b>MaxLineLength</b>: Integer read FMaxLineLength Write FMaxLineLength;</code></td>
|
---|
1163 | </tr>
|
---|
1164 | </table>
|
---|
1165 | <p>
|
---|
1166 | Define maximum length in bytes of <a class="normal" href="blcksock.TBlockSocket.html#LineBuffer">LineBuffer</a> for high-level receiving functions. If this functions try to read more data then this limit, error is returned! If value is 0 (default), no limitation is used. This is very good protection for stupid attacks to your server by sending lot of data without proper terminator... until all your memory is allocated by LineBuffer!
|
---|
1167 |
|
---|
1168 | <p>Note: This maximum length is checked only in functions, what read unknown number of bytes! (like <a class="normal" href="blcksock.TBlockSocket.html#RecvString">RecvString</a> or <a class="normal" href="blcksock.TBlockSocket.html#RecvTerminated">RecvTerminated</a>)</p>
|
---|
1169 | <table class="detail">
|
---|
1170 | <tr class="list">
|
---|
1171 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1172 | <td class="itemcode"><a name="MaxSendBandwidth"></a><code>property <b>MaxSendBandwidth</b>: Integer read FMaxSendBandwidth Write FMaxSendBandwidth;</code></td>
|
---|
1173 | </tr>
|
---|
1174 | </table>
|
---|
1175 | <p>
|
---|
1176 | Define maximal bandwidth for all sending operations in bytes per second. If value is 0 (default), bandwidth limitation is not used.</p>
|
---|
1177 | <table class="detail">
|
---|
1178 | <tr class="list">
|
---|
1179 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1180 | <td class="itemcode"><a name="MaxRecvBandwidth"></a><code>property <b>MaxRecvBandwidth</b>: Integer read FMaxRecvBandwidth Write FMaxRecvBandwidth;</code></td>
|
---|
1181 | </tr>
|
---|
1182 | </table>
|
---|
1183 | <p>
|
---|
1184 | Define maximal bandwidth for all receiving operations in bytes per second. If value is 0 (default), bandwidth limitation is not used.</p>
|
---|
1185 | <table class="detail">
|
---|
1186 | <tr class="list">
|
---|
1187 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1188 | <td class="itemcode"><a name="MaxBandwidth"></a><code>property <b>MaxBandwidth</b>: Integer Write SetBandwidth;</code></td>
|
---|
1189 | </tr>
|
---|
1190 | </table>
|
---|
1191 | <p>
|
---|
1192 | Define maximal bandwidth for all sending and receiving operations in bytes per second. If value is 0 (default), bandwidth limitation is not used.</p>
|
---|
1193 | <table class="detail">
|
---|
1194 | <tr class="list">
|
---|
1195 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1196 | <td class="itemcode"><a name="ConvertLineEnd"></a><code>property <b>ConvertLineEnd</b>: Boolean read FConvertLineEnd Write FConvertLineEnd;</code></td>
|
---|
1197 | </tr>
|
---|
1198 | </table>
|
---|
1199 | <p>
|
---|
1200 | Do a conversion of non-standard line terminators to CRLF. (Off by default) If <code>True</code>, then terminators like sigle CR, single LF or LFCR are converted to CRLF internally. This have effect only in <a class="normal" href="blcksock.TBlockSocket.html#RecvString">RecvString</a> method!</p>
|
---|
1201 | <table class="detail">
|
---|
1202 | <tr class="list">
|
---|
1203 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1204 | <td class="itemcode"><a name="Family"></a><code>property <b>Family</b>: <a href="blcksock.html#TSocketFamily">TSocketFamily</a> read FFamily Write SetFamily;</code></td>
|
---|
1205 | </tr>
|
---|
1206 | </table>
|
---|
1207 | <p>
|
---|
1208 | Specified Family of this socket. When you are using Windows preliminary support for IPv6, then I recommend to set this property!</p>
|
---|
1209 | <table class="detail">
|
---|
1210 | <tr class="list">
|
---|
1211 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1212 | <td class="itemcode"><a name="PreferIP4"></a><code>property <b>PreferIP4</b>: Boolean read FPreferIP4 Write FPreferIP4;</code></td>
|
---|
1213 | </tr>
|
---|
1214 | </table>
|
---|
1215 | <p>
|
---|
1216 | When resolving of domain name return both IPv4 and IPv6 addresses, then specify if is used IPv4 (dafault - <code>True</code>) or IPv6.</p>
|
---|
1217 | <table class="detail">
|
---|
1218 | <tr class="list">
|
---|
1219 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1220 | <td class="itemcode"><a name="InterPacketTimeout"></a><code>property <b>InterPacketTimeout</b>: Boolean read FInterPacketTimeout Write FInterPacketTimeout;</code></td>
|
---|
1221 | </tr>
|
---|
1222 | </table>
|
---|
1223 | <p>
|
---|
1224 | By default (<code>True</code>) is all timeouts used as timeout between two packets in reading operations. If you set this to <code>False</code>, then Timeouts is for overall reading operation!</p>
|
---|
1225 | <table class="detail">
|
---|
1226 | <tr class="list">
|
---|
1227 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1228 | <td class="itemcode"><a name="SendMaxChunk"></a><code>property <b>SendMaxChunk</b>: Integer read FSendMaxChunk Write FSendMaxChunk;</code></td>
|
---|
1229 | </tr>
|
---|
1230 | </table>
|
---|
1231 | <p>
|
---|
1232 | All sended datas was splitted by this value.</p>
|
---|
1233 | <table class="detail">
|
---|
1234 | <tr class="list">
|
---|
1235 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1236 | <td class="itemcode"><a name="StopFlag"></a><code>property <b>StopFlag</b>: Boolean read FStopFlag Write FStopFlag;</code></td>
|
---|
1237 | </tr>
|
---|
1238 | </table>
|
---|
1239 | <p>
|
---|
1240 | By setting this property to <code>True</code> you can stop any communication. You can use this property for soft abort of communication.</p>
|
---|
1241 | <table class="detail">
|
---|
1242 | <tr class="list">
|
---|
1243 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1244 | <td class="itemcode"><a name="NonblockSendTimeout"></a><code>property <b>NonblockSendTimeout</b>: Integer read FNonblockSendTimeout Write FNonblockSendTimeout;</code></td>
|
---|
1245 | </tr>
|
---|
1246 | </table>
|
---|
1247 | <p>
|
---|
1248 | Timeout for data sending by non-blocking socket mode.</p>
|
---|
1249 | <table class="detail">
|
---|
1250 | <tr class="list">
|
---|
1251 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1252 | <td class="itemcode"><a name="OnStatus"></a><code>property <b>OnStatus</b>: <a href="blcksock.html#THookSocketStatus">THookSocketStatus</a> read FOnStatus write FOnStatus;</code></td>
|
---|
1253 | </tr>
|
---|
1254 | </table>
|
---|
1255 | <p>
|
---|
1256 | This event is called by various reasons. It is good for monitoring socket, create gauges for data transfers, etc.</p>
|
---|
1257 | <table class="detail">
|
---|
1258 | <tr class="list">
|
---|
1259 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1260 | <td class="itemcode"><a name="OnReadFilter"></a><code>property <b>OnReadFilter</b>: <a href="blcksock.html#THookDataFilter">THookDataFilter</a> read FOnReadFilter write FOnReadFilter;</code></td>
|
---|
1261 | </tr>
|
---|
1262 | </table>
|
---|
1263 | <p>
|
---|
1264 | this event is good for some internal thinks about filtering readed datas. It is used by telnet client by example.</p>
|
---|
1265 | <table class="detail">
|
---|
1266 | <tr class="list">
|
---|
1267 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1268 | <td class="itemcode"><a name="OnCreateSocket"></a><code>property <b>OnCreateSocket</b>: <a href="blcksock.html#THookCreateSocket">THookCreateSocket</a> read FOnCreateSocket write FOnCreateSocket;</code></td>
|
---|
1269 | </tr>
|
---|
1270 | </table>
|
---|
1271 | <p>
|
---|
1272 | This event is called after real socket creation for setting special socket options, because you not know when socket is created. (it is depended on Ipv4, IPv6 or automatic mode)</p>
|
---|
1273 | <table class="detail">
|
---|
1274 | <tr class="list">
|
---|
1275 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1276 | <td class="itemcode"><a name="OnMonitor"></a><code>property <b>OnMonitor</b>: <a href="blcksock.html#THookMonitor">THookMonitor</a> read FOnMonitor write FOnMonitor;</code></td>
|
---|
1277 | </tr>
|
---|
1278 | </table>
|
---|
1279 | <p>
|
---|
1280 | This event is good for monitoring content of readed or writed datas.</p>
|
---|
1281 | <table class="detail">
|
---|
1282 | <tr class="list">
|
---|
1283 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1284 | <td class="itemcode"><a name="OnHeartbeat"></a><code>property <b>OnHeartbeat</b>: <a href="blcksock.html#THookHeartbeat">THookHeartbeat</a> read FOnHeartbeat write FOnHeartbeat;</code></td>
|
---|
1285 | </tr>
|
---|
1286 | </table>
|
---|
1287 | <p>
|
---|
1288 | This event is good for calling your code during long socket operations. (Example, for refresing UI if class in not called within the thread.) Rate of heartbeats can be modified by <a class="normal" href="blcksock.TBlockSocket.html#HeartbeatRate">HeartbeatRate</a> property.</p>
|
---|
1289 | <table class="detail">
|
---|
1290 | <tr class="list">
|
---|
1291 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1292 | <td class="itemcode"><a name="HeartbeatRate"></a><code>property <b>HeartbeatRate</b>: integer read FHeartbeatRate Write FHeartbeatRate;</code></td>
|
---|
1293 | </tr>
|
---|
1294 | </table>
|
---|
1295 | <p>
|
---|
1296 | Specify typical rate of <a class="normal" href="blcksock.TBlockSocket.html#OnHeartbeat">OnHeartbeat</a> event and <a class="normal" href="blcksock.TBlockSocket.html#StopFlag">StopFlag</a> testing. Default value 0 disabling heartbeats! Value is in milliseconds. Real rate can be higher or smaller then this value, because it depending on real socket operations too! Note: Each heartbeat slowing socket processing.</p>
|
---|
1297 | <table class="detail">
|
---|
1298 | <tr class="list">
|
---|
1299 | <td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
|
---|
1300 | <td class="itemcode"><a name="Owner"></a><code>property <b>Owner</b>: TObject read FOwner Write FOwner;</code></td>
|
---|
1301 | </tr>
|
---|
1302 | </table>
|
---|
1303 | <p>
|
---|
1304 | What class own this socket? Used by protocol implementation classes.</p>
|
---|
1305 | <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>
|
---|
1306 | </span>
|
---|
1307 | </body></html>
|
---|