ObjFW  Diff

Differences From Artifact [536375a07c]:

To Artifact [2b70c16414]:


319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
	}

# ifdef OF_HAVE_BLOCKS
	if (_block != NULL)
		return _block(object, _buffer, length, exception);
	else {
# endif
		if (exception == nil) {
			if (![_delegate respondsToSelector:
			    @selector(stream:didReadIntoBuffer:length:)])
				return false;

			return [_delegate stream: object
			       didReadIntoBuffer: _buffer
					  length: length];
		} else {
			if ([_delegate respondsToSelector:
			    @selector(stream:didFailToReadWithException:)])
				[_delegate		stream: object
				    didFailToReadWithException: exception];

			return false;
		}
# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc







<
|
|
|

|
|
|
<
<
<
<
|
<
<
<







319
320
321
322
323
324
325

326
327
328
329
330
331
332




333



334
335
336
337
338
339
340
	}

# ifdef OF_HAVE_BLOCKS
	if (_block != NULL)
		return _block(object, _buffer, length, exception);
	else {
# endif

		if (![_delegate respondsToSelector:
		    @selector(stream:didReadIntoBuffer:length:exception:)])
			return false;

		return [_delegate stream: object
		       didReadIntoBuffer: _buffer
				  length: length




			       exception: exception];



# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393

394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
		if (!_block(object, _buffer, _readLength, exception))
			return false;

		_readLength = 0;
		return true;
	} else {
# endif
		if (exception == nil) {
			if (![_delegate respondsToSelector:
			    @selector(stream:didReadIntoBuffer:length:)])
				return false;

			if (![_delegate stream: object
			     didReadIntoBuffer: _buffer
					length: _readLength])

				return false;

			_readLength = 0;
			return true;
		} else {
			if ([_delegate respondsToSelector:
			    @selector(stream:didFailToReadWithException:)])
				[_delegate		stream: object
				    didFailToReadWithException: exception];

			return false;
		}
# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc







<
|
|
|

|
|
|
>
|

|
|
<
<
<
<
<
<
<
<







371
372
373
374
375
376
377

378
379
380
381
382
383
384
385
386
387
388
389








390
391
392
393
394
395
396
		if (!_block(object, _buffer, _readLength, exception))
			return false;

		_readLength = 0;
		return true;
	} else {
# endif

		if (![_delegate respondsToSelector:
		    @selector(stream:didReadIntoBuffer:length:exception:)])
			return false;

		if (![_delegate stream: object
		     didReadIntoBuffer: _buffer
				length: _readLength
			     exception: exception])
			return false;

		_readLength = 0;
		return true;








# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
		return true;

# ifdef OF_HAVE_BLOCKS
	if (_block != NULL)
		return _block(object, line, exception);
	else {
# endif
		if (exception == nil) {
			if (![_delegate respondsToSelector:
			    @selector(stream:didReadLine:)])
				return false;

			return [_delegate stream: object
				     didReadLine: line];
		} else {
			if ([_delegate respondsToSelector:
			    @selector(stream:didFailToReadWithException:)])
				[_delegate		stream: object
				    didFailToReadWithException: exception];

			return false;
		}
# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc







<
|
|
|

|
|
<
<
<
<
|
<
<
<







419
420
421
422
423
424
425

426
427
428
429
430
431




432



433
434
435
436
437
438
439
		return true;

# ifdef OF_HAVE_BLOCKS
	if (_block != NULL)
		return _block(object, line, exception);
	else {
# endif

		if (![_delegate respondsToSelector:
		    @selector(stream:didReadLine:exception:)])
			return false;

		return [_delegate stream: object
			     didReadLine: line




			       exception: exception];



# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509

510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
		if (_length == 0)
			return false;

		_writtenLength = 0;
		return true;
	} else {
# endif
		if (exception == nil) {
			if (![_delegate respondsToSelector:
			    @selector(stream:didWriteBuffer:length:)])
				return false;

			_length = [_delegate stream: object
				     didWriteBuffer: &_buffer
					     length: _length];


			if (_length == 0)
				return false;

			_writtenLength = 0;
			return true;
		} else {
			if ([_delegate respondsToSelector:
			    @selector(stream:didFailToWriteWithException:)])
				[_delegate		 stream: object
				    didFailToWriteWithException: exception];

			return false;
		}
# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc







<
|
|
|

|
|
|
>

|
|

|
|
<
<
<
<
<
<
<
<







471
472
473
474
475
476
477

478
479
480
481
482
483
484
485
486
487
488
489
490
491








492
493
494
495
496
497
498
		if (_length == 0)
			return false;

		_writtenLength = 0;
		return true;
	} else {
# endif

		if (![_delegate respondsToSelector:
		    @selector(stream:didWriteBuffer:length:exception:)])
			return false;

		_length = [_delegate stream: object
			     didWriteBuffer: &_buffer
				     length: _length
				  exception: exception];

		if (_length == 0)
			return false;

		_writtenLength = 0;
		return true;








# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
	}

# ifdef OF_HAVE_BLOCKS
	if (_block != NULL)
		return _block(object, acceptedSocket, exception);
	else {
# endif
		if (exception == nil) {
			if (![_delegate respondsToSelector:
			    @selector(socket:didAcceptSocket:)])
				return false;

			return [_delegate socket: object
				 didAcceptSocket: acceptedSocket];
		} else {
			if ([_delegate respondsToSelector:
			    @selector(socket:didFailToAcceptWithException:)])
				[_delegate		  socket: object
				    didFailToAcceptWithException: exception];

			return false;
		}
# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc







<
|
|
|

|
|
<
<
<
<
|
<
<
<







540
541
542
543
544
545
546

547
548
549
550
551
552




553



554
555
556
557
558
559
560
	}

# ifdef OF_HAVE_BLOCKS
	if (_block != NULL)
		return _block(object, acceptedSocket, exception);
	else {
# endif

		if (![_delegate respondsToSelector:
		    @selector(socket:didAcceptSocket:exception:)])
			return false;

		return [_delegate socket: object
			 didAcceptSocket: acceptedSocket




			       exception: exception];



# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
	}

# ifdef OF_HAVE_BLOCKS
	if (_block != NULL)
		return _block(object, _buffer, length, address, exception);
	else {
# endif
		if (exception == nil) {
			if (![_delegate respondsToSelector: @selector(socket:
			    didReceiveIntoBuffer:length:sender:)])
				return false;

			return [_delegate socket: object
			    didReceiveIntoBuffer: _buffer
					  length: length
					  sender: address];
		} else {
			if ([_delegate respondsToSelector:
			    @selector(socket:didFailToReceiveWithException:)])
				[_delegate		   socket: object
				    didFailToReceiveWithException: exception];

			return false;
		}
# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc







<
|
|
|

|
|
|
|
<
<
<
<
|
<
<
<







583
584
585
586
587
588
589

590
591
592
593
594
595
596
597




598



599
600
601
602
603
604
605
	}

# ifdef OF_HAVE_BLOCKS
	if (_block != NULL)
		return _block(object, _buffer, length, address, exception);
	else {
# endif

		if (![_delegate respondsToSelector: @selector(
		    socket:didReceiveIntoBuffer:length:sender:exception:)])
			return false;

		return [_delegate socket: object
		    didReceiveIntoBuffer: _buffer
				  length: length
				  sender: address




			       exception: exception];



# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
	if (_block != NULL) {
		_length = _block(object, &_buffer,
		    (exception == nil ? _length : 0), &_receiver, exception);

		return (_length > 0);
	} else {
# endif
		if (exception == nil) {
			if (![_delegate respondsToSelector:
			    @selector(socket:didSendBuffer:length:receiver:)])
				return false;

			_length = [_delegate socket: object
				      didSendBuffer: &_buffer
					     length: _length
					   receiver: &_receiver];

			return (_length > 0);
		} else {
			if ([_delegate respondsToSelector:
			    @selector(socket:didFailToSendWithException:)])
				[_delegate		socket: object
				    didFailToSendWithException: exception];

			return false;
		}
# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc







<
|
|
|

|
|
|
|
<
<
<
<
<
<
|

|
<







628
629
630
631
632
633
634

635
636
637
638
639
640
641
642






643
644
645

646
647
648
649
650
651
652
	if (_block != NULL) {
		_length = _block(object, &_buffer,
		    (exception == nil ? _length : 0), &_receiver, exception);

		return (_length > 0);
	} else {
# endif

		if (![_delegate respondsToSelector:
		    @selector(socket:didSendBuffer:length:receiver:exception:)])
			return false;

		_length = [_delegate socket: object
			      didSendBuffer: &_buffer
				     length: (exception == nil ? _length : 0)
				   receiver: &_receiver






				  exception: exception];

		return (_length > 0);

# ifdef OF_HAVE_BLOCKS
	}
# endif
}

# ifdef OF_HAVE_BLOCKS
- (void)dealloc