-
2006-10-25
winsock - [winsock]
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://xingzhesun.blogbus.com/logs/3681376.html
CDragListBox
In addition to proving the functionality of a windows list box, the CDragListBox class allows
the user to move list box items.
修改socket属性
int TimeOut=6000; //设置发送超时6秒
if(::setsockopt(sock,SOL_SOCKET,SO_SNDTIMEO,(char *)&TimeOut,sizeof(TimeOut))==SOCKET_ERROR)
{
::closesocket (sock);
continue;
}
TimeOut=6000;//设置接收超时6秒
if(::setsockopt(sock,SOL_SOCKET,SO_RCVTIMEO,(char *)&TimeOut,sizeof(TimeOut))==SOCKET_ERROR)
{
::closesocket (sock);
continue;
}//设置非阻塞方式连接
unsigned long ul = 1;
ret = ioctlsocket(sock, FIONBIO, (unsigned long*)&ul);
if(ret==SOCKET_ERROR)
{
::closesocket (sock);
continue;
}随机文章:
Codejock InitCommandBars 2008-07-17Windows网络编程经验小结 2007-02-058.2.5完成端口模型 2006-11-278.2.3WSAEventSelect 2006-11-27第8章 WinsockIO方法 2006-11-26
收藏到:Del.icio.us








