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

📄 csimplesocket.html

📁 邮件客户端程序
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</pre>
<br><p>Back to the <a href="#topofdoc">top</a> of  <i> CSimpleSocket </i> <p>
<a name="int_ReceiveLine(CString&amp$_szLine,_int_nFlags_)$"><hr><p></p><h3>int ReceiveLine(CString&amp; szLine, int nFlags );</h3></a>
<p>
   <U>Purpose:</U> receives next line (string data only) from the socket.
<p>
   <U>Parameters:</U> 
<p>
<dl><dl>
<dt><i>in</i><strong> nFlags</strong>
<dd>                  option flag (same as for CSocket::<a href="#int_Receive(void*_lpBuf,_int_nBufLen,_int_nFlags_)$">Receive</a>())
<dt><i>out</i><strong> szLine</strong>
<dd>                  the line received from socket
<p>
</dl></dl>
   <U>Return value :</U> int = number of bytes received in case of success,
                               SOCKET_ERROR otherwise.
<p>
   <U>Description  :</U> Reads data up to the next CRLF character.
                         This function times out after (m_uTimeOut) milliseconds
<p>
<p><pre>
    int <a href="#int_ReceiveLine(CString&amp$_szLine,_int_nFlags_)$">ReceiveLine</a>(CString&amp; szLine, int nFlags = 0);
</pre>
<br><p>Back to the <a href="#topofdoc">top</a> of  <i> CSimpleSocket </i> <p>
<a name="int_Receive(void*_lpBuf,_int_nBufLen,_int_nFlags_)$"><hr><p></p><h3>int Receive(void* lpBuf, int nBufLen, int nFlags );</h3></a>
<p>
   <U>Purpose:</U> receive data from a socket (with timeout)
<p>
   <U>Parameters:</U> 
<p>
<dl><dl>
<dt><i>out</i><strong> lpBuf</strong>
<dd>                  A buffer for the incoming data
<dt><i>in</i><strong> nBufLen</strong>
<dd>                  The length of lpBuf in bytes
<dt><i>in</i><strong> nFlags</strong>
<dd>                  Specifies the way in which the call is made
                  (see CAsyncSocket::<a href="#int_Receive(void*_lpBuf,_int_nBufLen,_int_nFlags_)$">Receive</a>() for details)
<p>
</dl></dl>
   <U>Return value :</U> int = If no error occurs, Receive returns 
                               the number of bytes received.
                               If the connection has been closed, 
                               it returns 0. 
                               Otherwise, a value of SOCKET_ERROR 
                               is returned
<p>
   <U>Description  :</U> overrides method CAsyncSocket::<a href="#int_Receive(void*_lpBuf,_int_nBufLen,_int_nFlags_)$">Receive</a>()
<p>
<p><pre>
    virtual int <a href="#int_Receive(void*_lpBuf,_int_nBufLen,_int_nFlags_)$">Receive</a>(void* lpBuf, int nBufLen, int nFlags = 0);
</pre>
<br><p>Back to the <a href="#topofdoc">top</a> of  <i> CSimpleSocket </i> <p>
<a name="int_Send(const_void*_lpBuf,_int_nBufLen,_int_nFlags_)$"><hr><p></p><h3>int Send(const void* lpBuf, int nBufLen, int nFlags );</h3></a>
<p>
   <U>Purpose:</U> send data to the socket (with timeout)
<p>
   <U>Parameters:</U> 
<p>
<dl><dl>
<dt><i>in</i><strong> lpBuf</strong>
<dd>                  A buffer containing the data to be transmitted
<dt><i>in</i><strong> nBufLen</strong>
<dd>                  The length of the data in lpBuf in bytes
<dt><i>in</i><strong> nFlags</strong>
<dd>                  Specifies the way in which the call is made
                  (see CAsyncSocket::<a href="#int_Send(CString_&amp$szString,_int_nFlags_)$">Send</a>() for details)
<p>
</dl></dl>
   <U>Return value :</U> int = If no error occurs, Send returns 
                               the total number of characters sent.
                               Otherwise, a value of SOCKET_ERROR is 
                               returned.
<p>
   <U>Description  :</U> overrides method CAsyncSocket::<a href="#int_Send(CString_&amp$szString,_int_nFlags_)$">Send</a>()
<p>
<p><pre>
    virtual int <a href="#int_Send(CString_&amp$szString,_int_nFlags_)$">Send</a>(const void* lpBuf, int nBufLen, int nFlags = 0);
</pre>
<br><p>Back to the <a href="#topofdoc">top</a> of  <i> CSimpleSocket </i> <p>
<a name="int_Send(CString_&amp$szString,_int_nFlags_)$"><hr><p></p><h3>int Send(CString &amp;szString, int nFlags );</h3></a>
<p>
   <U>Purpose:</U> send string to the socket (with timeout)
<p>
   <U>Parameters:</U> 
<p>
<dl><dl>
<dt><i>in</i><strong> szString</strong>
<dd>                  A string to be transmitted
<dt><i>in</i><strong> nFlags</strong>
<dd>                  Specifies the way in which the call is made
                  (see CAsyncSocket::<a href="#int_Send(CString_&amp$szString,_int_nFlags_)$">Send</a>() for details)
<p>
</dl></dl>
   <U>Return value :</U> int = If no error occurs, Send returns 
                               the total number of characters sent.
                               Otherwise, a value of SOCKET_ERROR is 
                               returned.
<p>
   <U>Description  :</U> overrides method CAsyncSocket::<a href="#int_Send(CString_&amp$szString,_int_nFlags_)$">Send</a>()
<p>
<p><pre>
    virtual int <a href="#int_Send(CString_&amp$szString,_int_nFlags_)$">Send</a>(CString &amp;szString, int nFlags = 0);
</pre>
<br><p>Back to the <a href="#topofdoc">top</a> of  <i> CSimpleSocket </i> <p>
<a name="int_Send(LPCTSTR_lpszString,_int_nFlags_)$"><hr><p></p><h3>int Send(LPCTSTR lpszString, int nFlags );</h3></a>
<p>
   <U>Purpose:</U> send string to the socket (with timeout)
<p>
   <U>Parameters:</U> 
<p>
<dl><dl>
<dt><i>in</i><strong> lpszString</strong>
<dd>                  A pointer to a string to be transmitted
<dt><i>in</i><strong> nFlags</strong>
<dd>                  Specifies the way in which the call is made
                  (see CAsyncSocket::<a href="#int_Send(CString_&amp$szString,_int_nFlags_)$">Send</a>() for details)
<p>
</dl></dl>
   <U>Return value :</U> int = If no error occurs, Send returns 
                               the total number of characters sent.
                               Otherwise, a value of SOCKET_ERROR is 
                               returned.
<p>
   <U>Description  :</U> overrides method CAsyncSocket::<a href="#int_Send(CString_&amp$szString,_int_nFlags_)$">Send</a>()
<p>
<p><pre>
    virtual int <a href="#int_Send(CString_&amp$szString,_int_nFlags_)$">Send</a>(LPCTSTR lpszString, int nFlags = 0);
</pre>
<br><p>Back to the <a href="#topofdoc">top</a> of  <i> CSimpleSocket </i> <p>
<a name="void_SetTimeOut(UINT_uTimeOut_)$"><hr><p></p><h3>void SetTimeOut(UINT uTimeOut );</h3></a>
<p>
   <U>Purpose:</U> set the timeout value for all socket operations
<p>
   <U>Parameters:</U> 
<p>
<dl><dl>
<dt><i>in</i><strong> uTimeOut</strong>
<dd>                  timeout value, in milliseconds (0 for infinite wait)
<p>
</dl></dl>
   <U>Return value :</U> none
<p>
   <U>Description  :</U> Send/Receive methods use the timeout value
                         in their implementation.
<p>
<p><pre>
    void <a href="#void_SetTimeOut(UINT_uTimeOut_)$">SetTimeOut</a>(UINT uTimeOut = 0);
</pre>
<br><p>Back to the <a href="#topofdoc">top</a> of  <i> CSimpleSocket </i> <p>
<a name="UINT_GetTimeOut()_const$"><hr><p></p><h3>UINT GetTimeOut() const;</h3></a>
<p>
   <U>Purpose:</U> returns the timeout value for all socket operations
<p>
   <U>Parameters:</U> none
<p>
   <U>Return value :</U> UINT = timeout value, in milliseconds  (0 for infinite wait)
<p>
   <U>Description  :</U> 
<p>
<p><pre>
    UINT <a href="#UINT_GetTimeOut()_const$">GetTimeOut</a>() const;
</pre>
<br><p>Back to the <a href="#topofdoc">top</a> of  <i> CSimpleSocket </i> <p>
<a name="flat"><hr><p></p></a>
<h2>All Members</h2>
<dl>
<dt><strong>public:</strong>
<dd>BOOL <a href="CSimpleSocket.html#BOOL_Connect(_LPCTSTR_lpszHostAddress,_UINT_nHostPort,_UINT_uTimeOut_)$"><font color=green>Connect</font></a>( LPCTSTR lpszHostAddress, UINT nHostPort, UINT uTimeOut );
<dd>int <a href="CSimpleSocket.html#int_ReceiveString(CString&amp$_str,_int_nFlags_)$"><font color=green>ReceiveString</font></a>(CString&amp; str, int nFlags );
<dd>int <a href="CSimpleSocket.html#int_ReceiveLine(CString&amp$_szLine,_int_nFlags_)$"><font color=green>ReceiveLine</font></a>(CString&amp; szLine, int nFlags );
<dd>int <i><a href="CSimpleSocket.html#int_Receive(void*_lpBuf,_int_nBufLen,_int_nFlags_)$"><font color=green>Receive</font></a></i>(void* lpBuf, int nBufLen, int nFlags );
<dd>int <i><a href="CSimpleSocket.html#int_Send(const_void*_lpBuf,_int_nBufLen,_int_nFlags_)$"><font color=green>Send</font></a></i>(const void* lpBuf, int nBufLen, int nFlags );
<dd>int <i><a href="CSimpleSocket.html#int_Send(CString_&amp$szString,_int_nFlags_)$"><font color=green>Send</font></a></i>(CString &amp;szString, int nFlags );
<dd>int <i><a href="CSimpleSocket.html#int_Send(LPCTSTR_lpszString,_int_nFlags_)$"><font color=green>Send</font></a></i>(LPCTSTR lpszString, int nFlags );
<dd>void <a href="CSimpleSocket.html#void_SetTimeOut(UINT_uTimeOut_)$"><font color=green>SetTimeOut</font></a>(UINT uTimeOut );
<dd>UINT <a href="CSimpleSocket.html#UINT_GetTimeOut()_const$"><font color=green>GetTimeOut</font></a>() const;
<dt><strong>protected:</strong>
</dl>
<p>Back to the <a href="#topofdoc">top</a> of  CSimpleSocket<p>
<a name="parents"><hr><p></p></a>
<h2>Ancestors</h2>
Inheritance chain for CSimpleSocket:<p>
<ul>
<li>CSocket
</ul>
<p>Back to the <a href="#topofdoc">top</a> of  CSimpleSocket<p>
<a name="children"><hr><p></p></a>
<h2>Descendants</h2>
Class is not inherited by any others.<p>
<p>Back to the <a href="#topofdoc">top</a> of  CSimpleSocket<p>
<hr><p></p>
Generated from source by the <i><a href="http://www.stratasys.com/software/cocoon/index.htm">Cocoon</a></i> utilities on Tue Feb 08 17:47:03 2000
.<p>
<address>Report <a href="mailto:jkotula@stratasys.com">problems</a> to jkotula@stratasys.com</address>
</body></html>

⌨️ 快捷键说明

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