diff -r 9d67172bb323 -r 2bd9d60a2c46 TCP/TCPStream.h --- a/TCP/TCPStream.h Fri May 23 17:37:36 2008 -0700 +++ b/TCP/TCPStream.h Sun May 25 10:28:26 2008 -0700 @@ -10,7 +10,7 @@ @class TCPConnection, TCPWriter; -/** INTERNAL abstract superclass for data streams, used by TCPConnection. */ +/** Abstract superclass for data streams, used by TCPConnection. */ @interface TCPStream : NSObject { TCPConnection *_conn; @@ -55,8 +55,15 @@ /** Input stream for a TCPConnection. */ @interface TCPReader : TCPStream + /** The connection's TCPWriter. */ @property (readonly) TCPWriter *writer; + +/** Reads bytes from the stream, like the corresponding method of NSInputStream. + The number of bytes actually read is returned, or zero if no data is available. + If an error occurs, it will call its -_gotError method, and return a negative number. */ +- (NSInteger) read: (void*)dst maxLength: (NSUInteger)maxLength; + @end