79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
size_t i, count;
[self _processQueue];
if ([self _processCache])
return YES;
# ifdef FD_COPY
FD_COPY(&readFDs, &readFDs_);
FD_COPY(&writeFDs, &writeFDs_);
FD_COPY(&exceptFDs, &exceptFDs_);
# else
readFDs_ = readFDs;
writeFDs_ = writeFDs;
exceptFDs_ = exceptFDs;
# endif
time.tv_sec = timeout / 1000;
time.tv_usec = (timeout % 1000) * 1000;
if (select((int)maxFD + 1, &readFDs_, &writeFDs_, &exceptFDs_,
(timeout != -1 ? &time : NULL)) < 1)
return NO;
|
|
|
|
|
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
size_t i, count;
[self _processQueue];
if ([self _processCache])
return YES;
#ifdef FD_COPY
FD_COPY(&readFDs, &readFDs_);
FD_COPY(&writeFDs, &writeFDs_);
FD_COPY(&exceptFDs, &exceptFDs_);
#else
readFDs_ = readFDs;
writeFDs_ = writeFDs;
exceptFDs_ = exceptFDs;
#endif
time.tv_sec = timeout / 1000;
time.tv_usec = (timeout % 1000) * 1000;
if (select((int)maxFD + 1, &readFDs_, &writeFDs_, &exceptFDs_,
(timeout != -1 ? &time : NULL)) < 1)
return NO;
|