📄 classpindirectchannel.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PIndirectChannel class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PIndirectChannel Class Reference</h1><code>#include <<a class="el" href="indchan_8h-source.html">indchan.h</a>></code><p><p>Inheritance diagram for PIndirectChannel:<p><center><img src="classPIndirectChannel.png" usemap="#PIndirectChannel_map" border="0" alt=""></center><map name="PIndirectChannel_map"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="830,56,943,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="830,0,943,24"><area href="classPDelayChannel.html" alt="PDelayChannel" shape="rect" coords="0,168,113,192"><area href="classPInternetProtocol.html" alt="PInternetProtocol" shape="rect" coords="492,168,605,192"><area href="classPRFC822Channel.html" alt="PRFC822Channel" shape="rect" coords="615,168,728,192"><area href="classPSNMP.html" alt="PSNMP" shape="rect" coords="1045,168,1158,192"><area href="classPSSLChannel.html" alt="PSSLChannel" shape="rect" coords="1168,168,1281,192"><area href="classPVXMLSession.html" alt="PVXMLSession" shape="rect" coords="1291,168,1404,192"><area href="classPVXMLChannel.html" alt="PVXMLChannel" shape="rect" coords="0,224,113,248"><area href="classPFTP.html" alt="PFTP" shape="rect" coords="123,224,236,248"><area href="classPHTTP.html" alt="PHTTP" shape="rect" coords="369,224,482,248"><area href="classPPOP3.html" alt="PPOP3" shape="rect" coords="615,224,728,248"><area href="classPSMTP.html" alt="PSMTP" shape="rect" coords="861,224,974,248"><area href="classPSNMPClient.html" alt="PSNMPClient" shape="rect" coords="984,224,1097,248"><area href="classPSNMPServer.html" alt="PSNMPServer" shape="rect" coords="1107,224,1220,248"><area href="classPFTPClient.html" alt="PFTPClient" shape="rect" coords="246,280,359,304"><area href="classPFTPServer.html" alt="PFTPServer" shape="rect" coords="246,336,359,360"><area href="classPHTTPClient.html" alt="PHTTPClient" shape="rect" coords="492,280,605,304"><area href="classPHTTPServer.html" alt="PHTTPServer" shape="rect" coords="492,336,605,360"><area href="classPPOP3Client.html" alt="PPOP3Client" shape="rect" coords="738,280,851,304"><area href="classPPOP3Server.html" alt="PPOP3Server" shape="rect" coords="738,336,851,360"><area href="classPSMTPClient.html" alt="PSMTPClient" shape="rect" coords="984,280,1097,304"><area href="classPSMTPServer.html" alt="PSMTPServer" shape="rect" coords="984,336,1097,360"></map><a href="classPIndirectChannel-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td colspan="2"><div class="groupHeader">Construction</div></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z153_0">PIndirectChannel</a> ()</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z153_1">~PIndirectChannel</a> ()</td></tr><tr><td> </td><td><font size=-1><em>Close the indirect channel, deleting read/write channels if desired.</em> <a href="#z153_1"></a><em></em></font><br><br></td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PObject</div></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPObject.html#z199_0">Comparison</a> </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z155_0">Compare</a> (const <a class="el" href="classPObject.html">PObject</a> &obj) const</td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PChannel</div></td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z157_0">GetName</a> () const</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z157_1">Close</a> ()</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z157_2">IsOpen</a> () const</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z157_3">Read</a> (void *buf, PINDEX len)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z157_4">Write</a> (const void *buf, PINDEX len)</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z157_5">Shutdown</a> (<a class="el" href="classPChannel.html#z53_0">ShutdownValue</a> option)</td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="classPChannel.html">PChannel</a> * </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z157_6">GetBaseReadChannel</a> () const</td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="classPChannel.html">PChannel</a> * </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z157_7">GetBaseWriteChannel</a> () const</td></tr><tr><td nowrap align=right valign=top>virtual <a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z157_8">GetErrorText</a> (<a class="el" href="classPChannel.html#z55_1">ErrorGroup</a> group=NumErrorGroups) const</td></tr><tr><td colspan="2"><div class="groupHeader">Channel establish functions</div></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z159_0">Open</a> (<a class="el" href="classPChannel.html">PChannel</a> &channel)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z159_1">Open</a> (<a class="el" href="classPChannel.html">PChannel</a> *channel, BOOL autoDelete=TRUE)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z159_2">Open</a> (<a class="el" href="classPChannel.html">PChannel</a> *<a class="el" href="classPIndirectChannel.html#n0">readChannel</a>, <a class="el" href="classPChannel.html">PChannel</a> *<a class="el" href="classPIndirectChannel.html#n2">writeChannel</a>, BOOL autoDeleteRead=TRUE, BOOL autoDeleteWrite=TRUE)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPChannel.html">PChannel</a> * </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z159_3">GetReadChannel</a> () const</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z159_4">SetReadChannel</a> (<a class="el" href="classPChannel.html">PChannel</a> *channel, BOOL autoDelete=TRUE)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPChannel.html">PChannel</a> * </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z159_5">GetWriteChannel</a> () const</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#z159_6">SetWriteChannel</a> (<a class="el" href="classPChannel.html">PChannel</a> *channel, BOOL autoDelete=TRUE)</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#b0">OnOpen</a> ()</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPChannel.html">PChannel</a> * </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#n0">readChannel</a></td></tr><tr><td> </td><td><font size=-1><em>Channel for read operations.</em> <a href="#n0"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#n1">readAutoDelete</a></td></tr><tr><td> </td><td><font size=-1><em>Automatically delete read channel on destruction.</em> <a href="#n1"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPChannel.html">PChannel</a> * </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#n2">writeChannel</a></td></tr><tr><td> </td><td><font size=-1><em>Channel for write operations.</em> <a href="#n2"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#n3">writeAutoDelete</a></td></tr><tr><td> </td><td><font size=-1><em>Automatically delete write channel on destruction.</em> <a href="#n3"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPReadWriteMutex.html">PReadWriteMutex</a> </td><td valign=bottom><a class="el" href="classPIndirectChannel.html#n4">channelPointerMutex</a></td></tr><tr><td> </td><td><font size=-1><em>Race condition prevention on closing channel.</em> <a href="#n4"></a><em></em></font><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>This is a channel that operates indirectly through another channel(s). This allows for a protocol to operate through a "channel" mechanism and for its low level byte exchange (Read and Write) to operate via a completely different channel, eg TCP or Serial port etc. <p><hr><h2>Constructor & Destructor Documentation</h2><a name="z153_0" doxytag="PIndirectChannel::PIndirectChannel"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PIndirectChannel::PIndirectChannel </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Create a new indirect channel without any channels to redirect to. If an attempt to read or write is made before <a class="el" href="classPIndirectChannel.html#z159_0">Open()</a> is called the the functions will assert. </td> </tr></table><a name="z153_1" doxytag="PIndirectChannel::~PIndirectChannel"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> PINLINE PIndirectChannel::~PIndirectChannel </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Close the indirect channel, deleting read/write channels if desired.<p> </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="z157_1" doxytag="PIndirectChannel::Close"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual BOOL PIndirectChannel::Close </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Close the channel. This will detach itself from the read and write channels and delete both of them if they are auto delete.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the channel is closed. </dl><p>Reimplemented from <a class="el" href="classPChannel.html#z53_1">PChannel</a>.<p>Reimplemented in <a class="el" href="classPFTPClient.html#z479_0">PFTPClient</a>, <a class="el" href="classPSMTPClient.html#a2">PSMTPClient</a>, <a class="el" href="classPPOP3Client.html#a2">PPOP3Client</a>, <a class="el" href="classPRFC822Channel.html#a2">PRFC822Channel</a>, <a class="el" href="classPSSLChannel.html#a5">PSSLChannel</a>, <a class="el" href="classPVXMLSession.html#a13">PVXMLSession</a>, and <a class="el" href="classPVXMLChannel.html#a4">PVXMLChannel</a>. </td> </tr></table><a name="z155_0" doxytag="PIndirectChannel::Compare"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classPObject.html#z199_0">Comparison</a> PIndirectChannel::Compare </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPObject.html">PObject</a> & </td> <td class="mdname1" valign="top" nowrap> <em>obj</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Determine if the two objects refer to the same indirect channel. This actually compares the channel pointers.<p><dl compact><dt><b>Returns: </b></dt><dd> EqualTo if channel pointer identical. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>obj</em> </td><td>Another indirect channel to compare against. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPChannel.html#z45_0">PChannel</a>. </td> </tr></table><a name="z157_6" doxytag="PIndirectChannel::GetBaseReadChannel"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual <a class="el" href="classPChannel.html">PChannel</a>* PIndirectChannel::GetBaseReadChannel </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This function returns the eventual base channel for reading of a series of indirect channels provided by descendents of <a class="el" href="classPIndirectChannel.html#z153_0">PIndirectChannel</a>#.<p>The behaviour for this function is to return "this".<p><dl compact><dt><b>Returns: </b></dt><dd> Pointer to base I/O channel for the indirect channel. </dl><p>Reimplemented from <a class="el" href="classPChannel.html#z47_3">PChannel</a>. </td> </tr></table><a name="z157_7" doxytag="PIndirectChannel::GetBaseWriteChannel"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual <a class="el" href="classPChannel.html">PChannel</a>* PIndirectChannel::GetBaseWriteChannel </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This function returns the eventual base channel for writing of a series of indirect channels provided by descendents of <a class="el" href="classPIndirectChannel.html#z153_0">PIndirectChannel</a>#.<p>The behaviour for this function is to return "this".<p><dl compact><dt><b>Returns: </b></dt><dd> Pointer to base I/O channel for the indirect channel. </dl><p>Reimplemented from <a class="el" href="classPChannel.html#z47_4">PChannel</a>. </td> </tr></table><a name="z157_8" doxytag="PIndirectChannel::GetErrorText"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual <a class="el" href="classPString.html">PString</a> PIndirectChannel::GetErrorText </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classPChannel.html#z55_1">ErrorGroup</a> </td> <td class="mdname1" valign="top" nowrap> <em>group</em> = NumErrorGroups </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Get error message description. Return a string indicating the error message that may be displayed to the user. The error for the last I/O operation in this object is used. <dl compact><dt><b>Returns: </b></dt><dd>Operating System error description string. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>group</em> </td><td>Error group to get </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPChannel.html#z55_4">PChannel</a>.<p>Reimplemented in <a class="el" href="classPSSLChannel.html#a7">PSSLChannel</a>. </td> </tr></table><a name="z157_0" doxytag="PIndirectChannel::GetName"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual <a class="el" href="classPString.html">PString</a> PIndirectChannel::GetName </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -