/usr/share/doc/libucommon-dev/a00108.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 | <!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::pipestream 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 Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data 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 Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00108.html">pipestream</a>
</div>
</div>
<div class="contents">
<h1>ucc::pipestream Class Reference</h1><!-- doxytag: class="ucc::pipestream" --><!-- doxytag: inherits="std::streambuf,std::iostream" -->
<p>Streamable tcp connection between client and server.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="a00206_source.html">stream.h</a>></code></p>
<p>Inherits std::streambuf, and std::iostream.</p>
<div class="dynheader">
Collaboration diagram for ucc::pipestream:</div>
<div class="dynsection">
<div class="center"><img src="a00482.png" border="0" usemap="#ucc_1_1pipestream_coll__map" alt="Collaboration graph"/></div>
<map name="ucc_1_1pipestream_coll__map" id="ucc_1_1pipestream_coll__map">
<area shape="rect" id="node2" href="a00056.html" title="A container for generic and o/s portable threadsafe file system functions." alt="" coords="29,5,107,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 Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b>access_t</b> { <b>RDONLY</b>,
<b>WRONLY</b>,
<b>RDWR</b>
}</td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#abaddacd33a8cb36904db16360c6ba75b">close</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Close an active stream connection. <a href="#abaddacd33a8cb36904db16360c6ba75b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#aaef258e868bdbb5208916bf9995e60e9">open</a> (const char *command, access_t access, const char **env=NULL, size_t buffering=512)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Open a stream connection to a pipe service. <a href="#aaef258e868bdbb5208916bf9995e60e9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a1268849236bbee3f9130484e10b26077">operator bool</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See if stream connection is active. <a href="#a1268849236bbee3f9130484e10b26077"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a12deb1a1902af1a7fa8ad396d953bdf6">operator!</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">See if stream is disconnected. <a href="#a12deb1a1902af1a7fa8ad396d953bdf6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#adffc8fec36176b59bcd14eb7befc68ad">pipestream</a> (const char *command, access_t access, const char **env=NULL, size_t size=512)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create child process and start pipe. <a href="#adffc8fec36176b59bcd14eb7befc68ad"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a597f1799a5caa5753ca2b1cedb4dcf3e"></a><!-- doxytag: member="ucc::pipestream::pipestream" ref="a597f1799a5caa5753ca2b1cedb4dcf3e" args="()" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a597f1799a5caa5753ca2b1cedb4dcf3e">pipestream</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create an unopened pipe stream. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a180fc51dbe128c8cea3d4144cdacd506">sync</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Flush the stream input and output buffers, writes pending output. <a href="#a180fc51dbe128c8cea3d4144cdacd506"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab88dd8ac4b6b64ffe8dc42537fd953f1"></a><!-- doxytag: member="ucc::pipestream::terminate" ref="ab88dd8ac4b6b64ffe8dc42537fd953f1" args="(void)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#ab88dd8ac4b6b64ffe8dc42537fd953f1">terminate</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Force terminate child and close. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4046f30242f64ed197dede84a13ced7"></a><!-- doxytag: member="ucc::pipestream::~pipestream" ref="ad4046f30242f64ed197dede84a13ced7" args="()" -->
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#ad4046f30242f64ed197dede84a13ced7">~pipestream</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a pipe stream. <br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a719a751013a276154127bcbaf345c0e4">overflow</a> (int ch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This streambuf method is used to write the output buffer through the established pipe connection. <a href="#a719a751013a276154127bcbaf345c0e4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7f35d781ad7991d7e71ae2d919c52433"></a><!-- doxytag: member="ucc::pipestream::release" ref="a7f35d781ad7991d7e71ae2d919c52433" args="(void)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a7f35d781ad7991d7e71ae2d919c52433">release</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Release the stream, detach/do not wait for the process. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a928e5c80c3e9f4a56dc18e30656545e6">uflow</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This streambuf method is used for doing unbuffered reads through the establish tcp socket connection when in interactive mode. <a href="#a928e5c80c3e9f4a56dc18e30656545e6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a1807d6572f86744f84298a7357f6cb64">underflow</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This streambuf method is used to load the input buffer through the established pipe connection. <a href="#a1807d6572f86744f84298a7357f6cb64"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a95fe055945af1da9f6463e0e65510838"></a><!-- doxytag: member="ucc::pipestream::bufsize" ref="a95fe055945af1da9f6463e0e65510838" args="" -->
size_t </td><td class="memItemRight" valign="bottom"><b>bufsize</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7dbf34525e7bb6e3bc633a6e371aadf9"></a><!-- doxytag: member="ucc::pipestream::gbuf" ref="a7dbf34525e7bb6e3bc633a6e371aadf9" args="" -->
char * </td><td class="memItemRight" valign="bottom"><b>gbuf</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7f2a0ca9c2607ebdb4cd383162c8c781"></a><!-- doxytag: member="ucc::pipestream::pbuf" ref="a7f2a0ca9c2607ebdb4cd383162c8c781" args="" -->
char * </td><td class="memItemRight" valign="bottom"><b>pbuf</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6688a421949653fa52e809044c5297d"></a><!-- doxytag: member="ucc::pipestream::pid" ref="af6688a421949653fa52e809044c5297d" args="" -->
pid_t </td><td class="memItemRight" valign="bottom"><b>pid</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adbd96f58a955f7c70d9243d387c93cff"></a><!-- doxytag: member="ucc::pipestream::rd" ref="adbd96f58a955f7c70d9243d387c93cff" args="" -->
<a class="el" href="a00056.html">fsys_t</a> </td><td class="memItemRight" valign="bottom"><b>rd</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f52f5b928b00f7665fcf3b2458e2593"></a><!-- doxytag: member="ucc::pipestream::wr" ref="a1f52f5b928b00f7665fcf3b2458e2593" args="" -->
<a class="el" href="a00056.html">fsys_t</a> </td><td class="memItemRight" valign="bottom"><b>wr</b></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Streamable tcp connection between client and server. </p>
<p>The tcp stream class can represent a client connection to a server or an instance of a service generated by a tcp listener. As a stream class, data can be manipulated using the << and >> operators.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl>
<p>Definition at line <a class="el" href="a00206_source.html#l00175">175</a> of file <a class="el" href="a00206_source.html">stream.h</a>.</p>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="adffc8fec36176b59bcd14eb7befc68ad"></a><!-- doxytag: member="ucc::pipestream::pipestream" ref="adffc8fec36176b59bcd14eb7befc68ad" args="(const char *command, access_t access, const char **env=NULL, size_t size=512)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::pipestream::pipestream </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>command</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">access_t </td>
<td class="paramname"> <em>access</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char ** </td>
<td class="paramname"> <em>env</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>size</em> = <code>512</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create child process and start pipe. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>command</em> </td><td>to pass. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>access</em> </td><td>mode of pipe stream. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>env</em> </td><td>to create in child. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>of buffer. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="abaddacd33a8cb36904db16360c6ba75b"></a><!-- doxytag: member="ucc::pipestream::close" ref="abaddacd33a8cb36904db16360c6ba75b" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ucc::pipestream::close </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Close an active stream connection. </p>
<p>This waits for the child to terminate. </p>
</div>
</div>
<a class="anchor" id="aaef258e868bdbb5208916bf9995e60e9"></a><!-- doxytag: member="ucc::pipestream::open" ref="aaef258e868bdbb5208916bf9995e60e9" args="(const char *command, access_t access, const char **env=NULL, size_t buffering=512)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ucc::pipestream::open </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>command</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">access_t </td>
<td class="paramname"> <em>access</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char ** </td>
<td class="paramname"> <em>env</em> = <code>NULL</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> <em>buffering</em> = <code>512</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Open a stream connection to a pipe service. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>command</em> </td><td>to execute. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>access</em> </td><td>mode of stream. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>env</em> </td><td>to create in child process. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>buffering</em> </td><td>size to use. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a1268849236bbee3f9130484e10b26077"></a><!-- doxytag: member="ucc::pipestream::operator bool" ref="a1268849236bbee3f9130484e10b26077" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ucc::pipestream::operator bool </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>See if stream connection is active. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if stream is active. </dd></dl>
<p>Definition at line <a class="el" href="a00206_source.html#l00249">249</a> of file <a class="el" href="a00206_source.html">stream.h</a>.</p>
</div>
</div>
<a class="anchor" id="a12deb1a1902af1a7fa8ad396d953bdf6"></a><!-- doxytag: member="ucc::pipestream::operator!" ref="a12deb1a1902af1a7fa8ad396d953bdf6" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::pipestream::operator! </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>See if stream is disconnected. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if stream disconnected. </dd></dl>
<p>Definition at line <a class="el" href="a00206_source.html#l00256">256</a> of file <a class="el" href="a00206_source.html">stream.h</a>.</p>
</div>
</div>
<a class="anchor" id="a719a751013a276154127bcbaf345c0e4"></a><!-- doxytag: member="ucc::pipestream::overflow" ref="a719a751013a276154127bcbaf345c0e4" args="(int ch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ucc::pipestream::overflow </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>ch</em></td>
<td> ) </td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This streambuf method is used to write the output buffer through the established pipe connection. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>ch</em> </td><td>char to push through. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>char pushed through. </dd></dl>
</div>
</div>
<a class="anchor" id="a180fc51dbe128c8cea3d4144cdacd506"></a><!-- doxytag: member="ucc::pipestream::sync" ref="a180fc51dbe128c8cea3d4144cdacd506" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ucc::pipestream::sync </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Flush the stream input and output buffers, writes pending output. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, or error code. </dd></dl>
</div>
</div>
<a class="anchor" id="a928e5c80c3e9f4a56dc18e30656545e6"></a><!-- doxytag: member="ucc::pipestream::uflow" ref="a928e5c80c3e9f4a56dc18e30656545e6" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ucc::pipestream::uflow </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This streambuf method is used for doing unbuffered reads through the establish tcp socket connection when in interactive mode. </p>
<p>Also this method will handle proper use of buffers if not in interative mode.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>char from pipe connection, EOF if not connected. </dd></dl>
</div>
</div>
<a class="anchor" id="a1807d6572f86744f84298a7357f6cb64"></a><!-- doxytag: member="ucc::pipestream::underflow" ref="a1807d6572f86744f84298a7357f6cb64" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int ucc::pipestream::underflow </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This streambuf method is used to load the input buffer through the established pipe connection. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>char from get buffer, EOF if not connected. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00206_source.html">stream.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:39 2010 for UCommon by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|