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

📄 classpethsocket.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual BOOL PEthSocket::Read </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">void *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>buf</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>PINDEX&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>len</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Low level read from the channel. This function may block until the requested number of characters were read or the read timeout was reached. The <a class="el" href="classPChannel.html#z49_3">GetLastReadCount()</a> function returns the actual number of bytes read.<p>The <a class="el" href="classPChannel.html#z55_2">GetErrorCode()</a> function should be consulted after <a class="el" href="classPEthSocket.html#z115_1">Read()</a> returns FALSE to determine what caused the failure.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE indicates that at least one character was read from the channel. FALSE means no bytes were read due to timeout or some other I/O error. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>len</em>&nbsp;</td><td>Pointer to a block of memory to receive the read bytes. Maximum number of bytes to read into the buffer. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPSocket.html#a0">PSocket</a>.    </td>  </tr></table><a name="z123_1" doxytag="PEthSocket::ReadPacket"></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"> BOOL PEthSocket::ReadPacket </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classPBYTEArray.html">PBYTEArray</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>buffer</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="unionPEthSocket_1_1Address.html">Address</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>dest</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="unionPEthSocket_1_1Address.html">Address</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>src</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>WORD &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>type</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>PINDEX &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>len</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>BYTE *&amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>payload</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Read a packet from the interface and parse out the information specified by the parameters. This will automatically adjust for 802.2 and 802.3 ethernet frames.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the packet read, FALSE on error. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>dest</em>&nbsp;</td><td>Buffer to receive the raw packet </td></tr><tr><td valign=top><em>src</em>&nbsp;</td><td>Destination address of packet </td></tr><tr><td valign=top><em>type</em>&nbsp;</td><td>Source address of packet </td></tr><tr><td valign=top><em>len</em>&nbsp;</td><td>Packet frame type ID </td></tr><tr><td valign=top><em>payload</em>&nbsp;</td><td>Length of payload Pointer into buffer# of payload. </td></tr></table></dl>    </td>  </tr></table><a name="z123_0" doxytag="PEthSocket::ResetAdaptor"></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"> BOOL PEthSocket::ResetAdaptor </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Reset the interface.     </td>  </tr></table><a name="z121_3" doxytag="PEthSocket::SetFilter"></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"> BOOL PEthSocket::SetFilter </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">unsigned&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>mask</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>WORD&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>type</em> = TypeAll</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Set the current filtering criteria for receiving packets. A bit-wise OR of the FilterMask values will filter packets so that they do not appear in the <a class="el" href="classPEthSocket.html#z115_1">Read()</a> function at all.<p>The type is be the specific frame type to accept. A value of TypeAll may be used to match all frame types.<p>A value of zero for the filter mask is useless and will assert.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the address is returned, FALSE on error. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>type</em>&nbsp;</td><td>Bits for filtering on address Code for filtering on type. </td></tr></table></dl>    </td>  </tr></table><a name="z115_2" doxytag="PEthSocket::Write"></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 PEthSocket::Write </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const void *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>buf</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>PINDEX&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>len</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Low level write to the channel. This function will block until the requested number of characters are written or the write timeout is reached. The <a class="el" href="classPChannel.html#z51_3">GetLastWriteCount()</a> function returns the actual number of bytes written.<p>The <a class="el" href="classPChannel.html#z55_2">GetErrorCode()</a> function should be consulted after <a class="el" href="classPEthSocket.html#z115_2">Write()</a> returns FALSE to determine what caused the failure.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if at least len bytes were written to the channel. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>len</em>&nbsp;</td><td>Pointer to a block of memory to write. Number of bytes to write. </td></tr></table></dl><p>Reimplemented from <a class="el" href="classPChannel.html#z51_2">PChannel</a>.    </td>  </tr></table><hr><h2>Member Data Documentation</h2><a name="n4" doxytag="PEthSocket::fakeMacHeader"></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"> BOOL PEthSocket::fakeMacHeader<code> [protected]</code>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a name="n3" doxytag="PEthSocket::filterMask"></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"> unsigned PEthSocket::filterMask<code> [protected]</code>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a name="n0" doxytag="PEthSocket::filterType"></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"> WORD PEthSocket::filterType<code> [protected]</code>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a name="n5" doxytag="PEthSocket::ipppInterface"></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"> BOOL PEthSocket::ipppInterface<code> [protected]</code>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a name="n1" doxytag="PEthSocket::macAddress"></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="unionPEthSocket_1_1Address.html">Address</a> PEthSocket::macAddress<code> [protected]</code>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><a name="n2" doxytag="PEthSocket::medium"></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="classPEthSocket.html#z119_0">MediumTypes</a> PEthSocket::medium<code> [protected]</code>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>    </td>  </tr></table><hr>The documentation for this class was generated from the following file:<ul><li><a class="el" href="ethsock_8h-source.html">ethsock.h</a></ul><hr><address style="align: right;"><small>Generated on Wed Sep 29 22:44:15 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 + -