• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSStream, NSInputStream, NSOutputStream
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSStream, NSInputStream, NSOutputStream


  • Subject: Re: NSStream, NSInputStream, NSOutputStream
  • From: Michael Vannorsdel <email@hidden>
  • Date: Mon, 19 May 2008 19:27:13 -0600

How are you creating the stream?


On May 19, 2008, at 7:07 PM, John MacMullin wrote:

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]:\n%@\n", [ostream streamError]);
				NSLog(@"remainingToWrite:\n%u\n", remainingToWrite);
				NSLog(@"ostream:\n%@\n", 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.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >NSStream, NSInputStream, NSOutputStream (From: John MacMullin <email@hidden>)

  • Prev by Date: Re: Bindings: Allows Editing Multiple Values Selection
  • Next by Date: Re: NSStream, NSInputStream, NSOutputStream
  • Previous by thread: NSStream, NSInputStream, NSOutputStream
  • Next by thread: Re: NSStream, NSInputStream, NSOutputStream
  • Index(es):
    • Date
    • Thread