📄 inetprot_8h-source.html
字号:
00174 00175 <span class="comment">// New functions for class.</span>00181 <span class="comment"></span> <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a3">Connect</a>(00182 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & address, <span class="comment">// Address of remote machine to connect to.</span>00183 WORD port = 0 <span class="comment">// Port number to use for the connection.</span>00184 );00185 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a3">Connect</a>(00186 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & address, <span class="comment">// Address of remote machine to connect to.</span>00187 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & service <span class="comment">// Service name to use for the connection.</span>00188 );00189 00195 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a5">Accept</a>(00196 <a class="code" href="classPSocket.html">PSocket</a> & listener <span class="comment">// Address of remote machine to connect to.</span>00197 );00198 00205 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & <a class="code" href="classPInternetProtocol.html#a6">GetDefaultService</a>() <span class="keyword">const</span>;00206 00215 <a class="code" href="classPIPSocket.html">PIPSocket</a> * <a class="code" href="classPInternetProtocol.html#a7">GetSocket</a>() <span class="keyword">const</span>;00216 00224 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a8">WriteLine</a>(00225 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & line <span class="comment">// String to write as a command line.</span>00226 );00227 00244 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a9">ReadLine</a>(00245 <a class="code" href="classPString.html">PString</a> & line, <span class="comment">// String to receive a CR/LF terminated line.</span>00246 BOOL allowContinuation = FALSE <span class="comment">// Flag to handle continued lines.</span>00247 );00248 00252 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPInternetProtocol.html#a10">UnRead</a>(00253 <span class="keywordtype">int</span> ch <span class="comment">// Individual character to be returned.</span>00254 );00255 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPInternetProtocol.html#a10">UnRead</a>(00256 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & str <span class="comment">// String to be put back into data stream.</span>00257 );00258 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPInternetProtocol.html#a10">UnRead</a>(00259 <span class="keyword">const</span> <span class="keywordtype">void</span> * buffer, <span class="comment">// Characters to be put back into data stream.</span>00260 PINDEX len <span class="comment">// Number of characters to be returned.</span>00261 );00262 00276 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a13">WriteCommand</a>(00277 PINDEX cmdNumber <span class="comment">// Number of command to write.</span>00278 );00279 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a13">WriteCommand</a>(00280 PINDEX cmdNumber, <span class="comment">// Number of command to write.</span>00281 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & param <span class="comment">// Extra parameters required by the command.</span>00282 );00283 00301 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a15">ReadCommand</a>(00302 PINDEX & num,00303 <span class="comment">// Number of the command parsed from the command line, or P_MAX_INDEX</span>00304 <span class="comment">// if no match.</span>00305 <a class="code" href="classPString.html">PString</a> & args <span class="comment">// String to receive the arguments to the command.</span>00306 );00307 00324 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a16">WriteResponse</a>(00325 <span class="keywordtype">unsigned</span> numericCode, <span class="comment">// Response code for command response.</span>00326 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & info <span class="comment">// Extra information available after response code.</span>00327 );00328 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a16">WriteResponse</a>(00329 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & code, <span class="comment">// Response code for command response.</span>00330 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & info <span class="comment">// Extra information available after response code.</span>00331 );00332 00351 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a18">ReadResponse</a>();00352 <span class="keyword">virtual</span> BOOL <a class="code" href="classPInternetProtocol.html#a18">ReadResponse</a>(00353 <span class="keywordtype">int</span> & code, <span class="comment">// Response code for command response.</span>00354 <a class="code" href="classPString.html">PString</a> & info <span class="comment">// Extra information available after response code.</span>00355 );00356 00368 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classPInternetProtocol.html#a20">ExecuteCommand</a>(00369 PINDEX cmdNumber <span class="comment">// Number of command to write.</span>00370 );00371 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classPInternetProtocol.html#a20">ExecuteCommand</a>(00372 PINDEX cmdNumber, <span class="comment">// Number of command to write.</span>00373 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & param <span class="comment">// Extra parameters required by the command.</span>00374 );00375 00382 <span class="keywordtype">int</span> <a class="code" href="classPInternetProtocol.html#a22">GetLastResponseCode</a>() <span class="keyword">const</span>;00383 00389 <a class="code" href="classPString.html">PString</a> <a class="code" href="classPInternetProtocol.html#a23">GetLastResponseInfo</a>() <span class="keyword">const</span>;00390 00391 00392 <span class="keyword">protected</span>:00404 <span class="keyword">virtual</span> PINDEX <a class="code" href="classPInternetProtocol.html#b1">ParseResponse</a>(00405 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & line <span class="comment">// Input response line to be parsed</span>00406 );00407 00408 <a name="l00409"></a><a class="code" href="classPInternetProtocol.html#n0">00409</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPInternetProtocol.html#n0">defaultServiceName</a>;00410 <span class="comment">// Default Service name to use for the internet protocol socket.</span>00411 <a name="l00412"></a><a class="code" href="classPInternetProtocol.html#n1">00412</a> <a class="code" href="classPStringArray.html">PStringArray</a> <a class="code" href="classPInternetProtocol.html#n1">commandNames</a>;00413 <span class="comment">// Names of each of the command codes.</span>00414 <a name="l00415"></a><a class="code" href="classPInternetProtocol.html#n2">00415</a> <a class="code" href="classPCharArray.html">PCharArray</a> <a class="code" href="classPInternetProtocol.html#n2">unReadBuffer</a>;00416 <span class="comment">// Buffer for characters put back into the data stream.</span>00417 <a name="l00418"></a><a class="code" href="classPInternetProtocol.html#n3">00418</a> PINDEX <a class="code" href="classPInternetProtocol.html#n3">unReadCount</a>;00419 <span class="comment">// Buffer count for characters put back into the data stream.</span>00420 <a name="l00421"></a><a class="code" href="classPInternetProtocol.html#n4">00421</a> <a class="code" href="classPTimeInterval.html">PTimeInterval</a> <a class="code" href="classPInternetProtocol.html#n4">readLineTimeout</a>;00422 <span class="comment">// Time for characters in a line to be received.</span>00423 <a name="l00424"></a><a class="code" href="classPInternetProtocol.html#t6">00424</a> <span class="keyword">enum</span> <a class="code" href="classPInternetProtocol.html#t6">StuffState</a> {00425 <a class="code" href="classPInternetProtocol.html#t6t0">DontStuff</a>, <a class="code" href="classPInternetProtocol.html#t6t1">StuffIdle</a>, <a class="code" href="classPInternetProtocol.html#t6t2">StuffCR</a>, <a class="code" href="classPInternetProtocol.html#t6t3">StuffCRLF</a>, <a class="code" href="classPInternetProtocol.html#t6t4">StuffCRLFdot</a>, <a class="code" href="classPInternetProtocol.html#t6t5">StuffCRLFdotCR</a>00426 } <a class="code" href="classPInternetProtocol.html#n5">stuffingState</a>;00427 <span class="comment">// Do byte stuffing of '.' characters in output to the socket channel.</span>00428 <a name="l00429"></a><a class="code" href="classPInternetProtocol.html#n6">00429</a> BOOL <a class="code" href="classPInternetProtocol.html#n6">newLineToCRLF</a>;00430 <span class="comment">// Translate \n characters to CR/LF pairs.</span>00431 <a name="l00432"></a><a class="code" href="classPInternetProtocol.html#n7">00432</a> <span class="keywordtype">int</span> <a class="code" href="classPInternetProtocol.html#n7">lastResponseCode</a>;<a name="l00433"></a><a class="code" href="classPInternetProtocol.html#n8">00433</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPInternetProtocol.html#n8">lastResponseInfo</a>;00434 <span class="comment">// Responses</span>00435 00436 <span class="keyword">private</span>:00437 BOOL AttachSocket(<a class="code" href="classPIPSocket.html">PIPSocket</a> * socket);00438 };00439 00440 00441 00442 <span class="preprocessor">#endif</span>00443 <span class="preprocessor"></span>00444 00445 <span class="comment">// End Of File ///////////////////////////////////////////////////////////////</span></pre></div><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:11 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 + -