当前位置: 技术问答>linux和unix
select时间问题
来源: 互联网 发布时间:2017-02-28
本文导语: FD_SET(srvSock,&usFds); tv.tv_sec = 1; tv.tv_usec = 0; int index = 0; while(1) { n = select(maxSock + 1, &usFds, NULL, NULL, &tv); if(FD_ISSET(srvSock,&usFds)) { ...
FD_SET(srvSock,&usFds);
tv.tv_sec = 1;
tv.tv_usec = 0;
int index = 0;
while(1)
{
n = select(maxSock + 1, &usFds, NULL, NULL, &tv);
if(FD_ISSET(srvSock,&usFds))
{
cout
tv.tv_sec = 1;
tv.tv_usec = 0;
int index = 0;
while(1)
{
n = select(maxSock + 1, &usFds, NULL, NULL, &tv);
if(FD_ISSET(srvSock,&usFds))
{
cout