Skip navigation.
 
mlNSStream, NSInputStream, NSOutputStream
FROM : John MacMullin
DATE : Sun May 18 17:50:27 2008

I modified slightly the Echo Server code sample from Apple with the 
following results.  One, I couldn't stream a large file from a 
polling routine.  More than likely it would cancel because of a 
Sigterm 15.

It appears from reading the docs that the user cannot detect the end 
of a stream and that the NSStreamEventEndEncountered only detects a 
close. Two, when unarchiving a file in a client input stream delegate 
method, if the stream terminated from the server because it was too 
large, the client terminates on an unarchiver error because it didn't 
get the whole stream.  Third, the output stream methods shown in Echo 
Server are polling methods, not delegate methods.

So:

1. How do I stream a large file between connections or is NSStream 
the wrong tool?  Can the stream size be modified?

2. What is the largest stream size?

3. Is it possible to detect a valid archive before I unarchive it, or 
do I simply have to intercept the exception?

4. How does one trigger and make available a file an output stream so 
that the delegate methods can be used?    

Thank,

John MacMullin

Related mailsAuthorDate
mlNSStream, NSInputStream, NSOutputStream John MacMullin May 18, 17:50
mlRe: NSStream, NSInputStream, NSOutputStream Jens Alfke May 18, 20:10
mlRe: NSStream, NSInputStream, NSOutputStream Ken Thomases May 18, 20:26
mlRe: NSStream, NSInputStream, NSOutputStream John MacMullin May 19, 06:19
mlRe: NSStream, NSInputStream, NSOutputStream Jens Alfke May 19, 08:45
mlNSStream, NSInputStream, NSOutputStream John MacMullin May 20, 03:07
mlRe: NSStream, NSInputStream, NSOutputStream Michael Vannorsdel May 20, 03:27
mlRe: NSStream, NSInputStream, NSOutputStream Ken Thomases May 20, 03:32
mlRe: NSStream, NSInputStream, NSOutputStream John MacMullin May 20, 05:26