This file is indexed.

/usr/share/doc/libucommon-dev/a00162.html is in libucommon-doc 3.2.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>UCommon: ucc::TCPSocket Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00162.html">TCPSocket</a>
  </div>
</div>
<div class="contents">
<h1>ucc::TCPSocket Class Reference</h1><!-- doxytag: class="ucc::TCPSocket" --><!-- doxytag: inherits="ucc::IOBuffer,ucc::Socket" -->
<p>A generic tcp socket class that offers i/o buffering.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00189_source.html">buffer.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ucc::TCPSocket:</div>
<div class="dynsection">
<div class="center"><img src="a00565.png" border="0" usemap="#ucc_1_1_t_c_p_socket_inherit__map" alt="Inheritance graph"/></div>
<map name="ucc_1_1_t_c_p_socket_inherit__map" id="ucc_1_1_t_c_p_socket_inherit__map">
<area shape="rect" id="node7" href="a00154.html" title="Secure socket class." alt="" coords="65,160,169,189"/><area shape="rect" id="node2" href="a00057.html" title="Common buffered I/O class." alt="" coords="5,5,107,35"/><area shape="rect" id="node4" href="a00151.html" title="A generic socket base class." alt="" coords="131,5,227,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for ucc::TCPSocket:</div>
<div class="dynsection">
<div class="center"><img src="a00566.png" border="0" usemap="#ucc_1_1_t_c_p_socket_coll__map" alt="Collaboration graph"/></div>
<map name="ucc_1_1_t_c_p_socket_coll__map" id="ucc_1_1_t_c_p_socket_coll__map">
<area shape="rect" id="node2" href="a00057.html" title="Common buffered I/O class." alt="" coords="5,5,107,35"/><area shape="rect" id="node4" href="a00151.html" title="A generic socket base class." alt="" coords="131,5,227,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#ac514c11a5ffb0c55d50f9f90194520dc">blocking</a> (<a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=<a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set timeout interval and blocking.  <a href="#ac514c11a5ffb0c55d50f9f90194520dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab55bbb63bde5bee2d52504f32c623d84"></a><!-- doxytag: member="ucc::TCPSocket::close" ref="ab55bbb63bde5bee2d52504f32c623d84" args="(void)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#ab55bbb63bde5bee2d52504f32c623d84">close</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close active connection. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a6f98d54a3d21cebd344e4f561412fbc5">open</a> (const char *host, size_t size=536)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Connect a tcp client session to a specific host uri.  <a href="#a6f98d54a3d21cebd344e4f561412fbc5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#ac5fc5b64728ac1668701d6d693f1129d">open</a> (<a class="el" href="a00161.html">TCPServer</a> *server, size_t size=536)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Connect a tcp socket to a client from a listener.  <a href="#ac5fc5b64728ac1668701d6d693f1129d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a4e153320094ecc110a763209187da70f">pending</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check for pending tcp or ssl data.  <a href="#a4e153320094ecc110a763209187da70f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a86f63ec91a2141440cc581bfe07ef543">TCPSocket</a> (const char *service, const char *host, size_t size=536)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a tcp client session connected to a specific host uri.  <a href="#a86f63ec91a2141440cc581bfe07ef543"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a2dc268ce8294996dd6fd3da03b675384">TCPSocket</a> (<a class="el" href="a00161.html">TCPServer</a> *server, size_t size=536)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a tcp server session from a listening socket.  <a href="#a2dc268ce8294996dd6fd3da03b675384"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#ab1907e96a6634d7d4aefc70cfde3f818">TCPSocket</a> (const char *service)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an unconnected tcp client and specify our service profile.  <a href="#ab1907e96a6634d7d4aefc70cfde3f818"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef82b225ba6064b0d9b4b98f7d3da082"></a><!-- doxytag: member="ucc::TCPSocket::~TCPSocket" ref="aef82b225ba6064b0d9b4b98f7d3da082" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#aef82b225ba6064b0d9b4b98f7d3da082">~TCPSocket</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destroy the tcp socket and release all resources. <br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a1ce3ecc90dae3c278143ecf3f54e9b9a">_pull</a> (char *<a class="el" href="a00152.html">address</a>, size_t size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Method to pull buffer from physical i/o (read).  <a href="#a1ce3ecc90dae3c278143ecf3f54e9b9a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#aa4d11855ebc0e3539812b6d3eb16eb81">_push</a> (const char *<a class="el" href="a00152.html">address</a>, size_t size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Method to push buffer into physical i/o (write).  <a href="#aa4d11855ebc0e3539812b6d3eb16eb81"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">short&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a564b9472822fc844374afa6fe2896e8d">getservice</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the effective "service" port identifier of the socket.  <a href="#a564b9472822fc844374afa6fe2896e8d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">socket_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a427d117adcc383bb0d527f200335e5a3">getsocket</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the low level socket object.  <a href="#a427d117adcc383bb0d527f200335e5a3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a4171d7185abfcf5aae9292770ae24ae1">peek</a> (char *data, size_t size, <a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> timeout=<a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a>)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Peek at socket input.  <a href="#a4171d7185abfcf5aae9292770ae24ae1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a52172dafbeda0cb51e7624f5ae3611e7">tag</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the tag used for this socket.  <a href="#a52172dafbeda0cb51e7624f5ae3611e7"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A generic tcp socket class that offers i/o buffering. </p>
<p>All user i/o operations are directly inherited from the <a class="el" href="a00057.html" title="Common buffered I/O class.">IOBuffer</a> base class public members. Some additional members are added for layering ssl services. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>&gt; </dd></dl>

<p>Definition at line <a class="el" href="a00189_source.html#l00493">493</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab1907e96a6634d7d4aefc70cfde3f818"></a><!-- doxytag: member="ucc::TCPSocket::TCPSocket" ref="ab1907e96a6634d7d4aefc70cfde3f818" args="(const char *service)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ucc::TCPSocket::TCPSocket </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>service</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct an unconnected tcp client and specify our service profile. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>service</em>&nbsp;</td><td>identifer, usually by name. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2dc268ce8294996dd6fd3da03b675384"></a><!-- doxytag: member="ucc::TCPSocket::TCPSocket" ref="a2dc268ce8294996dd6fd3da03b675384" args="(TCPServer *server, size_t size=536)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ucc::TCPSocket::TCPSocket </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00161.html">TCPServer</a> *&nbsp;</td>
          <td class="paramname"> <em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em> = <code>536</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct a tcp server session from a listening socket. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>server</em>&nbsp;</td><td>socket we are created from. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of buffer and tcp fragments. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a86f63ec91a2141440cc581bfe07ef543"></a><!-- doxytag: member="ucc::TCPSocket::TCPSocket" ref="a86f63ec91a2141440cc581bfe07ef543" args="(const char *service, const char *host, size_t size=536)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ucc::TCPSocket::TCPSocket </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>service</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em> = <code>536</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct a tcp client session connected to a specific host uri. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>service</em>&nbsp;</td><td>identifier of our client. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>host</em>&nbsp;</td><td>and optional :port we are connecting to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of buffer and tcp fragments. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a1ce3ecc90dae3c278143ecf3f54e9b9a"></a><!-- doxytag: member="ucc::TCPSocket::_pull" ref="a1ce3ecc90dae3c278143ecf3f54e9b9a" args="(char *address, size_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t ucc::TCPSocket::_pull </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Method to pull buffer from physical i/o (read). </p>
<p>The address is passed to this virtual since it is hidden as private. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>address</em>&nbsp;</td><td>of buffer to pull data into. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of buffer area being pulled.. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of read written, 0 on error or end of data. </dd></dl>

<p>Reimplemented from <a class="el" href="a00057.html#ad6089d06f36137661b2f0c37943a4187">ucc::IOBuffer</a>.</p>

<p>Reimplemented in <a class="el" href="a00154.html#ad9a5b8e666290f81728ca0efbf13a019">ucc::SSocket</a>.</p>

</div>
</div>
<a class="anchor" id="aa4d11855ebc0e3539812b6d3eb16eb81"></a><!-- doxytag: member="ucc::TCPSocket::_push" ref="aa4d11855ebc0e3539812b6d3eb16eb81" args="(const char *address, size_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t ucc::TCPSocket::_push </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Method to push buffer into physical i/o (write). </p>
<p>The address is passed to this virtual since it is hidden as private. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>address</em>&nbsp;</td><td>of data to push. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of data to push. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes written, 0 on error. </dd></dl>

<p>Reimplemented from <a class="el" href="a00057.html#abe10b39c40a9cc0ba70b9e025dec072a">ucc::IOBuffer</a>.</p>

<p>Reimplemented in <a class="el" href="a00154.html#ae4b4ff82b33cd469c94c04de190918a6">ucc::SSocket</a>.</p>

</div>
</div>
<a class="anchor" id="ac514c11a5ffb0c55d50f9f90194520dc"></a><!-- doxytag: member="ucc::TCPSocket::blocking" ref="ac514c11a5ffb0c55d50f9f90194520dc" args="(timeout_t timeout=Timer::inf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucc::TCPSocket::blocking </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code><a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a></code></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set timeout interval and blocking. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>to use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a564b9472822fc844374afa6fe2896e8d"></a><!-- doxytag: member="ucc::TCPSocket::getservice" ref="a564b9472822fc844374afa6fe2896e8d" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">short ucc::TCPSocket::getservice </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the effective "service" port identifier of the socket. </p>
<p>If the socket was created from a listener, this will be the port number of the listening socket, and hence can be useful to determine which service connected and whether ssl is needed. If this is a client socket, it will be the service port of the peer socket. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>service identifier associated with the socket. </dd></dl>

<p>Definition at line <a class="el" href="a00189_source.html#l00520">520</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>

</div>
</div>
<a class="anchor" id="a427d117adcc383bb0d527f200335e5a3"></a><!-- doxytag: member="ucc::TCPSocket::getsocket" ref="a427d117adcc383bb0d527f200335e5a3" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">socket_t ucc::TCPSocket::getsocket </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the low level socket object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>socket we are using. </dd></dl>

<p>Definition at line <a class="el" href="a00189_source.html#l00509">509</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>

</div>
</div>
<a class="anchor" id="a6f98d54a3d21cebd344e4f561412fbc5"></a><!-- doxytag: member="ucc::TCPSocket::open" ref="a6f98d54a3d21cebd344e4f561412fbc5" args="(const char *host, size_t size=536)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucc::TCPSocket::open </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em> = <code>536</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Connect a tcp client session to a specific host uri. </p>
<p>If the socket was already connected, it is automatically closed first. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>host</em>&nbsp;</td><td>and optional :port we are connecting to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of buffer and tcp fragments. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented in <a class="el" href="a00154.html#aa1065ec7c655f0b263797d02e83a81c8">ucc::SSocket</a>.</p>

</div>
</div>
<a class="anchor" id="ac5fc5b64728ac1668701d6d693f1129d"></a><!-- doxytag: member="ucc::TCPSocket::open" ref="ac5fc5b64728ac1668701d6d693f1129d" args="(TCPServer *server, size_t size=536)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucc::TCPSocket::open </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00161.html">TCPServer</a> *&nbsp;</td>
          <td class="paramname"> <em>server</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em> = <code>536</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Connect a tcp socket to a client from a listener. </p>
<p>If the socket was already connected, it is automatically closed first. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>server</em>&nbsp;</td><td>we are connected from. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of buffer and tcp fragments. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented in <a class="el" href="a00154.html#a34479172604ba2f8f998e6aa9c9d7414">ucc::SSocket</a>.</p>

</div>
</div>
<a class="anchor" id="a4171d7185abfcf5aae9292770ae24ae1"></a><!-- doxytag: member="ucc::TCPSocket::peek" ref="a4171d7185abfcf5aae9292770ae24ae1" args="(char *data, size_t size, timeout_t timeout=Timer::inf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t ucc::TCPSocket::peek </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00201.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>timeout</em> = <code><a class="el" href="a00169.html#aa3783e1d579d343cf8e55f0f907d67b8">Timer::inf</a></code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Peek at socket input. </p>
<p>This might be used to get a header at connection and to see if ssl/tls service is needed. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>buffer to store peek results. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of data to peek. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>to wait for peek. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes seen. </dd></dl>

</div>
</div>
<a class="anchor" id="a4e153320094ecc110a763209187da70f"></a><!-- doxytag: member="ucc::TCPSocket::pending" ref="a4e153320094ecc110a763209187da70f" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ucc::TCPSocket::pending </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check for pending tcp or ssl data. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if data pending. </dd></dl>

<p>Reimplemented from <a class="el" href="a00057.html#af74ba2a42576801ceaab76eee3fbef66">ucc::IOBuffer</a>.</p>

<p>Reimplemented in <a class="el" href="a00154.html#ab891511f1e2b841c7c60fcd995736d26">ucc::SSocket</a>.</p>

</div>
</div>
<a class="anchor" id="a52172dafbeda0cb51e7624f5ae3611e7"></a><!-- doxytag: member="ucc::TCPSocket::tag" ref="a52172dafbeda0cb51e7624f5ae3611e7" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* ucc::TCPSocket::tag </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the tag used for this socket. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>service tag associated with this socket. </dd></dl>

<p>Definition at line <a class="el" href="a00189_source.html#l00527">527</a> of file <a class="el" href="a00189_source.html">buffer.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00189_source.html">buffer.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:51 2010 for UCommon by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>