⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcpsock_8h-source.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
00109 <span class="comment"> * Revision 1.6  1995/01/01  01:07:33  robertj</span>00110 <span class="comment"> * More implementation.</span>00111 <span class="comment"> *</span>00112 <span class="comment"> * Revision 1.5  1994/08/23  11:32:52  robertj</span>00113 <span class="comment"> * Oops</span>00114 <span class="comment"> *</span>00115 <span class="comment"> * Revision 1.4  1994/08/22  00:46:48  robertj</span>00116 <span class="comment"> * Added pragma fro GNU C++ compiler.</span>00117 <span class="comment"> *</span>00118 <span class="comment"> * Revision 1.3  1994/08/21  23:43:02  robertj</span>00119 <span class="comment"> * Changed type of socket port number for better portability.</span>00120 <span class="comment"> * Added Out of Band data functions.</span>00121 <span class="comment"> *</span>00122 <span class="comment"> * Revision 1.2  1994/07/25  03:36:03  robertj</span>00123 <span class="comment"> * Added sockets to common, normalising to same comment standard.</span>00124 <span class="comment"> *</span>00125 <span class="comment"> */</span>00126 00127 <span class="preprocessor">#ifndef _PTCPSOCKET</span>00128 <span class="preprocessor"></span><span class="preprocessor">#define _PTCPSOCKET</span>00129 <span class="preprocessor"></span>00130 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00131 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00132 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00133 <span class="preprocessor"></span>00134 <a name="l00137"></a><a class="code" href="classPTCPSocket.html">00137</a> <span class="keyword">class </span><a class="code" href="classPTCPSocket.html">PTCPSocket</a> : <span class="keyword">public</span> <a class="code" href="classPIPSocket.html">PIPSocket</a>00138 {00139   <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPTCPSocket.html">PTCPSocket</a>, <a class="code" href="classPIPSocket.html">PIPSocket</a>);00140   <span class="keyword">public</span>:00150     <a class="code" href="classPTCPSocket.html#z423_0">PTCPSocket</a>(00151       WORD <a class="code" href="classPSocket.html#n0">port</a> = 0             00152     );00153     <a class="code" href="classPTCPSocket.html#z423_0">PTCPSocket</a>(00154       <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; service   00155     );00156     <a class="code" href="classPTCPSocket.html#z423_0">PTCPSocket</a>(00157       <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; address,  00158       WORD <a class="code" href="classPSocket.html#n0">port</a>                 00159     );00160     <a class="code" href="classPTCPSocket.html#z423_0">PTCPSocket</a>(00161       <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; address,  00162       <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> &amp; service   00163     );00164     <a class="code" href="classPTCPSocket.html#z423_0">PTCPSocket</a>(00165       <a class="code" href="classPSocket.html">PSocket</a> &amp; socket          00166     );00167     <a class="code" href="classPTCPSocket.html#z423_0">PTCPSocket</a>(00168       <a class="code" href="classPTCPSocket.html">PTCPSocket</a> &amp; tcpSocket    00169     );00171 00186     <span class="keyword">virtual</span> <a class="code" href="classPObject.html">PObject</a> * <a class="code" href="classPTCPSocket.html#z425_0">Clone</a>() <span class="keyword">const</span>;00188 00205     <span class="keyword">virtual</span> BOOL <a class="code" href="classPTCPSocket.html#z427_0">Write</a>(00206       <span class="keyword">const</span> <span class="keywordtype">void</span> * buf, 00207       PINDEX len        00208     );00210 00226     <span class="keyword">virtual</span> BOOL <a class="code" href="classPTCPSocket.html#z429_0">Listen</a>(00227       <span class="keywordtype">unsigned</span> queueSize = 5,  00228       WORD <a class="code" href="classPSocket.html#n0">port</a> = 0,           00229       <a class="code" href="classPSocket.html#z369_0">Reusability</a> reuse = <a class="code" href="classPSocket.html#z369_0s1">AddressIsExclusive</a> 00230     );00231     <span class="keyword">virtual</span> BOOL <a class="code" href="classPTCPSocket.html#z429_0">Listen</a>(00232       <span class="keyword">const</span> Address &amp; bind,     00233       <span class="keywordtype">unsigned</span> queueSize = 5,   00234       WORD <a class="code" href="classPSocket.html#n0">port</a> = 0,            00235       <a class="code" href="classPSocket.html#z369_0">Reusability</a> reuse = <a class="code" href="classPSocket.html#z369_0s1">AddressIsExclusive</a> 00236     );00237 00252     <span class="keyword">virtual</span> BOOL <a class="code" href="classPTCPSocket.html#z429_2">Accept</a>(00253       <a class="code" href="classPSocket.html">PSocket</a> &amp; socket          00254     );00256 00270     <span class="keyword">virtual</span> BOOL <a class="code" href="classPTCPSocket.html#z431_0">WriteOutOfBand</a>(00271       <span class="keyword">const</span> <span class="keywordtype">void</span> * buf,   00272       PINDEX len          00273     );00274 00281     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPTCPSocket.html#z431_1">OnOutOfBand</a>(00282       <span class="keyword">const</span> <span class="keywordtype">void</span> * buf,   00283       PINDEX len          00284     );00286 00287 00288   <span class="keyword">protected</span>:00289     <span class="comment">// Open an IPv4 socket (for backward compatibility)</span>00290     <span class="keyword">virtual</span> BOOL <a class="code" href="classPTCPSocket.html#b0">OpenSocket</a>();00291 00292     <span class="comment">// Open an IPv4 or IPv6 socket</span>00293     <span class="keyword">virtual</span> BOOL <a class="code" href="classPTCPSocket.html#b0">OpenSocket</a>(00294       <span class="keywordtype">int</span> ipAdressFamily00295     );00296 00297     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="classPTCPSocket.html#b2">GetProtocolName</a>() <span class="keyword">const</span>;00298 00299 00300 <span class="comment">// Include platform dependent part of class</span>00301 <span class="preprocessor">#ifdef _WIN32</span>00302 <span class="preprocessor"></span><span class="preprocessor">#include "msos/ptlib/tcpsock.h"</span>00303 <span class="preprocessor">#else</span>00304 <span class="preprocessor"></span><span class="preprocessor">#include "unix/ptlib/tcpsock.h"</span>00305 <span class="preprocessor">#endif</span>00306 <span class="preprocessor"></span>};00307 00308 <span class="preprocessor">#endif</span>00309 <span class="preprocessor"></span>00310 <span class="comment">// End Of File ///////////////////////////////////////////////////////////////</span></pre></div><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:12 2004 for PWLib by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -