483
484
485
486
487
488
489
490
491
492
493
494
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
531
532
533
|
[pool release];
return;
}
}
- (BOOL)connection: (OFTCPSocket*)connection
didReceiveISO88591Line: (OFString*)line
exception: (OFException*)exception
{
if (line != nil) {
[self processLine: line];
[sock asyncReadLineWithTarget: self
selector: @selector(connection:
didReceiveLine:
exception:)];
}
return NO;
}
- (BOOL)connection: (OFTCPSocket*)connection
didReceiveLine: (OFString*)line
exception: (OFException*)exception
{
if (line != nil) {
[self processLine: line];
return YES;
}
if ([exception isKindOfClass: [OFInvalidEncodingException class]])
[sock asyncReadLineWithEncoding: OF_STRING_ENCODING_ISO_8859_1
target: self
selector: @selector(connection:
didReceiveISO88591Line:
exception:)];
return NO;
}
- (void)handleConnection
{
[sock asyncReadLineWithTarget: self
selector: @selector(connection:didReceiveLine:
exception:)];
}
- (void)dealloc
{
[sock release];
[server release];
[nickname release];
|
>
|
|
>
>
|
>
|
>
|
483
484
485
486
487
488
489
490
491
492
493
494
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
531
532
533
534
535
536
537
538
|
[pool release];
return;
}
}
- (BOOL)connection: (OFTCPSocket*)connection
didReceiveISO88591Line: (OFString*)line
context: (id)context
exception: (OFException*)exception
{
if (line != nil) {
[self processLine: line];
[sock asyncReadLineWithTarget: self
selector: @selector(connection:
didReceiveLine:context:
exception:)
context: nil];
}
return NO;
}
- (BOOL)connection: (OFTCPSocket*)connection
didReceiveLine: (OFString*)line
context: (id)context
exception: (OFException*)exception
{
if (line != nil) {
[self processLine: line];
return YES;
}
if ([exception isKindOfClass: [OFInvalidEncodingException class]])
[sock asyncReadLineWithEncoding: OF_STRING_ENCODING_ISO_8859_1
target: self
selector: @selector(connection:
didReceiveISO88591Line:
context:exception:)
context: nil];
return NO;
}
- (void)handleConnection
{
[sock asyncReadLineWithTarget: self
selector: @selector(connection:didReceiveLine:
context:exception:)
context: nil];
}
- (void)dealloc
{
[sock release];
[server release];
[nickname release];
|