Up

LineObject class reference

Authors

Andrew Ruder (aeruder@ksu.edu)

Version: Revision 1

Date: November 8, 2003

Copyright: (C) Andrew Ruder

Software documentation for the LineObject class

LineObject : NSObject

Declared in:
LineObject.h
Conforms to:
NetObject
LineObject is used for line-buffered connections (end in \r\n or just \n). To use, simply override lineReceived: in a subclass of LineObject. By default, LineObject does absolutely nothing with lineReceived except throw the line away. Use line object if you simply want line-buffered input. This can be used on IRC, telnet, etc.

Instance Variables

Method summary

connectionEstablished: 

- (id) connectionEstablished: (id<NetTransport>)aTransport;
Initializes data and retains aTransport aTransport should conform to the <NetTransport> protocol.

connectionLost 

- (void) connectionLost;
Cleans up the instance variables and releases the transport. If/when the transport is dealloc'd, the connection will be closed.

dataReceived: 

- (id) dataReceived: (NSData*)newData;
Adds the data to a buffer. Then calls -lineReceived: for all full lines currently in the buffer. Don't override this, override -lineReceived: .

lineReceived: 

- (id) lineReceived: (NSData*)aLine;
Subclasses must override this method.
aLine contains a full line of text (without the ending newline)

transport 

- (id<NetTransport>) transport;
Returns the transport



Instance Variables for LineObject Class

_readData

@protected NSMutableData* _readData;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

transport

@protected id transport;
Description forthcoming.





Up