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.

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 closes/releases the transport.


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 should override this method.

aLine contains a full line of text (without the ending newline)


transport

- (id<NetTransport>) transport;

Returns the transport



Up