Continuing on my efforts re: my modified Echo Server, the following code is crashing.

- (void)startStreamWrite:(NSOutputStream *)ostream
{
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc]init];
        while ([ostream hasSpaceAvailable]) {
                if (remainingToWrite > 0) {
                        actuallyWritten = 0;
                        actuallyWritten = [ostream write:marker maxLength:1];
                        if ((actuallyWritten == -1) || (actuallyWritten == -1)) 
{
                                NSLog(@"[ostream streamError]:[EMAIL 
PROTECTED]", [ostream streamError]);
                                NSLog(@"remainingToWrite:\n%u\n", 
remainingToWrite);
                                NSLog(@"ostream:[EMAIL PROTECTED]", ostream);
                        } else {
                                remainingToWrite -= actuallyWritten;
                                marker += actuallyWritten;
                                NSLog(@"remainingToWrite:\n%u\n", 
remainingToWrite);                          
                        }
                }
        }
    [pool release];
}

The error returned is: [ostream streamError]:
NSError "POSIX error: Broken pipe" Domain=NSPOSIXErrorDomain Code=32

I have looked at the stream error docs in NSStream and this error is not even reference.

Any ideas on what this means and how I fix it would be greatly appreciated.

John


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to