26# include <exec/types.h>
27# include <exec/tasks.h>
30OF_ASSUME_NONNULL_BEGIN
42@protocol OFKernelEventObserverDelegate <
OFObject>
58- (void)objectIsReadyForReading: (
id)object;
65- (void)objectIsReadyForWriting: (
id)object;
67#if defined(OF_AMIGAOS) || defined(DOXYGEN)
73- (void)execSignalWasReceived: (ULONG)signalMask;
105#ifdef OF_HAVE_SOCKETS
120 id <OFKernelEventObserverDelegate> _Nullable _delegate;
121# if defined(OF_AMIGAOS)
122 struct Task *_waitingTask;
124# elif defined(OF_HAVE_PIPE)
127 OFSocketHandle _cancelFD[2];
128 struct sockaddr_in _cancelAddr;
131 ULONG _execSignalMask;
139@property OF_NULLABLE_PROPERTY (assign, nonatomic)
142# if defined(OF_AMIGAOS) || defined(DOXYGEN)
171- (void)addObjectForReading: (
id <OFReadyForReadingObserving>)object;
183- (void)addObjectForWriting: (
id <OFReadyForWritingObserving>)object;
195- (void)removeObjectForReading: (
id <OFReadyForReadingObserving>)object;
207- (void)removeObjectForWriting: (
id <OFReadyForWritingObserving>)object;
235- (void)observeUntilDate: (
OFDate *)date;
double OFTimeInterval
A time interval in seconds.
Definition OFObject.h:154
A class for storing, accessing and comparing dates.
Definition OFDate.h:34
A class that can observe multiple kernel events (e.g. streams being ready to read) at once.
Definition OFKernelEventObserver.h:115
bool of_processReadBuffers()
This method should be called by subclasses in observeUntilDate: as the first thing to handle all sock...
Definition OFKernelEventObserver.m:201
void cancel()
Cancels the currently blocking observe call.
Definition OFKernelEventObserver.m:251
void observe()
Observes all objects and blocks until an event happens on an object.
Definition OFKernelEventObserver.m:236
ULONG execSignalMask
A mask of Exec Signals to wait for.
Definition OFKernelEventObserver.h:148
instancetype observer()
Creates a new OFKernelEventObserver.
Definition OFKernelEventObserver.m:64
id< OFKernelEventObserverDelegate > delegate
The delegate for the OFKernelEventObserver.
Definition OFKernelEventObserver.h:140
An abstract class for storing, adding and removing objects in an array.
Definition OFMutableArray.h:48
A class for storing and manipulating arbitrary data in an array.
Definition OFMutableData.h:30
The root class for all other classes inside ObjFW.
Definition OFObject.h:692
int fileDescriptorForReading
The file descriptor for reading that should be checked by the OFKernelEventObserver.
Definition OFKernelEventObserver.h:88
int fileDescriptorForWriting
The file descriptor for writing that should be checked by the OFKernelEventObserver.
Definition OFKernelEventObserver.h:102