盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

基于Visual C++的Winsock API研究

时间:2025/3/13作者:未知来源:盾怪网教程人气:

[摘要]lEvent == 0 )  return ERR_BADPARAM; if( WSAAsyncSelect( m_hSocket, hWnd, wMsg, lEvent ) == SOCKET_E...
lEvent == 0 )
  return ERR_BADPARAM;
 if( WSAAsyncSelect( m_hSocket, hWnd, wMsg, lEvent ) == SOCKET_ERROR )
 {
  set_LastError( "WSAAsyncSelect() failed", WSAGetLastError() );
  return ERR_WSAERROR;
 }
 return ERR_SUCCESS;
}
////////////////////////////////////////////////////
int CMySocket::Listen( int iQueuedConnections )//监听函数;
{
 if( iQueuedConnections == 0 )
  return ERR_BADPARAM;
 if( listen( m_hSocket, iQueuedConnections ) == SOCKET_ERROR )
 {
  set_LastError( "listen() failed", WSAGetLastError() );
  return ERR_WSAERROR;
 }
 return ERR_SUCCESS;
}
////////////////////////////////////////////////////
int CMySocket::Send( char* strData, int iLen )//数据发送函数;
{
 if( strData == NULL

关键词:基于Visual C++的Winsock API研究




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版