73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
if (_cancelFD[0] > INT_MAX)
@throw [OFOutOfRangeException exception];
_maxFD = (int)_cancelFD[0];
#endif
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)addObjectForReading: (id <OFReadyForReadingObserving>)object
|
|
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
if (_cancelFD[0] > INT_MAX)
@throw [OFOutOfRangeException exception];
_maxFD = (int)_cancelFD[0];
#endif
} @catch (id e) {
objc_release(self);
@throw e;
}
return self;
}
- (void)addObjectForReading: (id <OFReadyForReadingObserving>)object
|
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
# endif
}
#endif
pool = objc_autoreleasePoolPush();
for (id <OFReadyForReadingObserving> object in
[[_readObjects copy] autorelease]) {
void *pool2 = objc_autoreleasePoolPush();
int fd = object.fileDescriptorForReading;
if (FD_ISSET((OFSocketHandle)fd, &readFDs) &&
[_delegate respondsToSelector:
@selector(objectIsReadyForReading:)])
[_delegate objectIsReadyForReading: object];
objc_autoreleasePoolPop(pool2);
}
for (id <OFReadyForWritingObserving> object in
[[_writeObjects copy] autorelease]) {
void *pool2 = objc_autoreleasePoolPush();
int fd = object.fileDescriptorForWriting;
if (FD_ISSET((OFSocketHandle)fd, &writeFDs) &&
[_delegate respondsToSelector:
@selector(objectIsReadyForWriting:)])
[_delegate objectIsReadyForWriting: object];
|
|
|
|
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
# endif
}
#endif
pool = objc_autoreleasePoolPush();
for (id <OFReadyForReadingObserving> object in
objc_autorelease([_readObjects copy])) {
void *pool2 = objc_autoreleasePoolPush();
int fd = object.fileDescriptorForReading;
if (FD_ISSET((OFSocketHandle)fd, &readFDs) &&
[_delegate respondsToSelector:
@selector(objectIsReadyForReading:)])
[_delegate objectIsReadyForReading: object];
objc_autoreleasePoolPop(pool2);
}
for (id <OFReadyForWritingObserving> object in
objc_autorelease([_writeObjects copy])) {
void *pool2 = objc_autoreleasePoolPush();
int fd = object.fileDescriptorForWriting;
if (FD_ISSET((OFSocketHandle)fd, &writeFDs) &&
[_delegate respondsToSelector:
@selector(objectIsReadyForWriting:)])
[_delegate objectIsReadyForWriting: object];
|