@@ -63,13 +63,12 @@ return self; } - (void)OF_addObjectForReading: (id)object + fileDescriptor: (int)fd { - int fd = [object fileDescriptorForReading]; - if (fd < 0 || fd > INT_MAX - 1) @throw [OFOutOfRangeException exception]; #ifndef OF_WINDOWS if (fd >= FD_SETSIZE) @@ -81,13 +80,12 @@ FD_SET(fd, &_readFDs); } - (void)OF_addObjectForWriting: (id)object + fileDescriptor: (int)fd { - int fd = [object fileDescriptorForWriting]; - if (fd < 0 || fd > INT_MAX - 1) @throw [OFOutOfRangeException exception]; #ifndef OF_WINDOWS if (fd >= FD_SETSIZE) @@ -99,15 +97,14 @@ FD_SET(fd, &_writeFDs); } - (void)OF_removeObjectForReading: (id)object + fileDescriptor: (int)fd { /* TODO: Adjust _maxFD */ - int fd = [object fileDescriptorForReading]; - if (fd < 0) @throw [OFOutOfRangeException exception]; #ifndef OF_WINDOWS if (fd >= FD_SETSIZE) @@ -116,15 +113,14 @@ FD_CLR(fd, &_readFDs); } - (void)OF_removeObjectForWriting: (id)object + fileDescriptor: (int)fd { /* TODO: Adjust _maxFD */ - int fd = [object fileDescriptorForWriting]; - if (fd < 0) @throw [OFOutOfRangeException exception]; #ifndef OF_WINDOWS if (fd >= FD_SETSIZE) @@ -142,11 +138,11 @@ fd_set writeFDs; struct timeval timeout; int events; size_t i, count; - [self OF_processQueueAndStoreRemovedIn: nil]; + [self OF_processQueue]; [self OF_processReadBuffers]; objc_autoreleasePoolPop(pool); #ifdef FD_COPY