21 # define _WIN32_WINNT 0x0501
23 # include <ws2tcpip.h>
37 #ifndef OF_STREAM_OBSERVER_M
42 #ifdef OF_HAVE_OPTIONAL_PROTOCOLS
57 - (void)streamIsReadyForReading: (
OFStream*)stream;
64 - (void)streamIsReadyForWriting: (
OFStream*)stream;
71 - (void)streamDidReceiveException: (
OFStream*)stream;
83 __unsafe_unretained
OFStream **FDToStream;
87 id <OFStreamObserverDelegate>
delegate;
90 struct sockaddr_in cancelAddr;
95 #ifdef OF_HAVE_PROPERTIES
96 @property (assign) id <OFStreamObserverDelegate> delegate;
104 + (instancetype)observer;
133 - (void)addStreamForReading: (
OFStream*)stream;
145 - (void)addStreamForWriting: (
OFStream*)stream;
155 - (void)removeStreamForReading: (
OFStream*)stream;
165 - (void)removeStreamForWriting: (
OFStream*)stream;
179 - (BOOL)observeWithTimeout: (
double)timeout;
190 - (void)OF_addFileDescriptorForReading: (
int)fd;
191 - (void)OF_addFileDescriptorForWriting: (
int)fd;
192 - (void)OF_removeFileDescriptorForReading: (
int)fd;
193 - (void)OF_removeFileDescriptorForWriting: (
int)fd;
194 - (void)OF_processQueue;
195 - (BOOL)OF_processCache;