ObjFW  Diff

Differences From Artifact [769871dec1]:

To Artifact [fe517b8418]:


290
291
292
293
294
295
296
297
298

299
300





301









302
303
304
305
306
307
308
- (void)dealloc
{
	[self close];

	[super dealloc];
}

/*
 * FIXME: Add -[fileDescriptor]. The problem is that we have two FDs, which is

 *	  not yet supported by OFStreamObserver. This has to be split into one
 *	  FD for reading and one for writing.





 */










- (void)closeForWriting
{
#ifndef _WIN32
	if (writePipe[1] != -1)
		close(writePipe[1]);








<
|
>
|
|
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>







290
291
292
293
294
295
296

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
- (void)dealloc
{
	[self close];

	[super dealloc];
}


- (int)fileDescriptorForReading
{
#ifndef _WIN32
	return readPipe[0];
#else
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
#endif
}

- (int)fileDescriptorForWRiting
{
#ifndef _WIN32
	return writePipe[1];
#else
	@throw [OFNotImplementedException exceptionWithClass: [self class]
						    selector: _cmd];
#endif
}

- (void)closeForWriting
{
#ifndef _WIN32
	if (writePipe[1] != -1)
		close(writePipe[1]);