ObjFW  Diff

Differences From Artifact [14f367ec0c]:

To Artifact [4b5320c792]:


31
32
33
34
35
36
37

38
39
40
41
42
43
44
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45







+







#import "OFDataArray.h"
#ifdef _WIN32
# import "OFTCPSocket.h"
#endif
#ifdef OF_HAVE_THREADS
# import "OFMutex.h"
#endif
#import "OFDate.h"

#ifdef HAVE_KQUEUE
# import "OFStreamObserver_kqueue.h"
#endif
#ifdef HAVE_POLL_H
# import "OFStreamObserver_poll.h"
#endif
366
367
368
369
370
371
372
373

374
375
376

377
378
379
380





381
382
383
384
385
386
387
367
368
369
370
371
372
373

374
375
376

377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393







-
+


-
+




+
+
+
+
+







		[_mutex unlock];
#endif
	}
}

- (void)observe
{
	[self observeWithTimeout: -1];
	[self observeForTimeInterval: -1];
}

- (bool)observeWithTimeout: (double)timeout
- (bool)observeForTimeInterval: (double)timeInterval
{
	[self doesNotRecognizeSelector: _cmd];
	abort();
}

- (bool)observeUntilDate: (OFDate*)date
{
	return [self observeForTimeInterval: [date timeIntervalSinceNow]];
}

- (void)cancel
{
#ifndef _WIN32
	OF_ENSURE(write(_cancelFD[1], "", 1) > 0);
#else
	OF_ENSURE(sendto(_cancelFD[1], "", 1, 0, (struct sockaddr*)&_cancelAddr,