TCPObject Class Reference

#include <tcpObject.h>

Inheritance diagram for TCPObject:

Inheritance graph
[legend]
List of all members.

Public Types

 Disconnected
 DNSResolved
 Connected
 Listening
enum  State {
  Disconnected,
  DNSResolved,
  Connected,
  Listening
}

Public Member Functions

 TCPObject ()
virtual ~TCPObject ()
void parseLine (U8 *buffer, U32 *start, U32 bufferLen)
void finishLastLine ()
virtual U32 onReceive (U8 *buffer, U32 bufferLen)
virtual bool processLine (UTF8 *line)
virtual void onDNSResolved ()
virtual void onDNSFailed ()
virtual void onConnected ()
virtual void onConnectFailed ()
virtual void onConnectionRequest (const NetAddress *addr, U32 connectId)
virtual void onDisconnect ()
void connect (const char *address)
void listen (U16 port)
void disconnect ()
State getState ()
bool processArguments (S32 argc, const char **argv)
 Process constructor options. (ie, new SimObject(1,2,3)).
void send (const U8 *buffer, U32 bufferLen)
void addToTable (NetSocket newTag)
void removeFromTable ()
void setPort (U16 port)
bool onAdd ()
 Called when the object is added to the sim.
 DECLARE_CONOBJECT (TCPObject)

Static Public Member Functions

static TCPObjectfind (NetSocket tag)

Protected Types

typedef SimObject Parent

Protected Attributes

U8mBuffer
U32 mBufferSize
U16 mPort

Private Types

 TableSize = 256
 TableMask = 0xFF
enum  {
  TableSize = 256,
  TableMask = 0xFF
}

Private Attributes

NetSocket mTag
TCPObjectmNext
State mState

Static Private Attributes

static TCPObjecttable [TableSize]

Member Typedef Documentation

typedef SimObject TCPObject::Parent [protected]

Reimplemented from SimObject.

Reimplemented in HTTPObject.


Member Enumeration Documentation

Enumerator:
Disconnected 
DNSResolved 
Connected 
Listening 

anonymous enum [private]

Enumerator:
TableSize 
TableMask 


Constructor & Destructor Documentation

TCPObject::TCPObject (  ) 

virtual TCPObject::~TCPObject (  )  [virtual]


Member Function Documentation

void TCPObject::parseLine ( U8 buffer,
U32 start,
U32  bufferLen 
)

void TCPObject::finishLastLine (  ) 

static TCPObject* TCPObject::find ( NetSocket  tag  )  [static]

virtual U32 TCPObject::onReceive ( U8 buffer,
U32  bufferLen 
) [virtual]

Reimplemented in HTTPObject.

virtual bool TCPObject::processLine ( UTF8 line  )  [virtual]

virtual void TCPObject::onDNSResolved (  )  [virtual]

virtual void TCPObject::onDNSFailed (  )  [virtual]

virtual void TCPObject::onConnected (  )  [virtual]

Reimplemented in HTTPObject.

virtual void TCPObject::onConnectFailed (  )  [virtual]

Reimplemented in HTTPObject.

virtual void TCPObject::onConnectionRequest ( const NetAddress addr,
U32  connectId 
) [virtual]

virtual void TCPObject::onDisconnect (  )  [virtual]

Reimplemented in HTTPObject.

void TCPObject::connect ( const char *  address  ) 

void TCPObject::listen ( U16  port  ) 

void TCPObject::disconnect (  ) 

State TCPObject::getState (  )  [inline]

bool TCPObject::processArguments ( S32  argc,
const char **  argv 
) [virtual]

Process constructor options. (ie, new SimObject(1,2,3)).

Reimplemented from SimObject.

void TCPObject::send ( const U8 buffer,
U32  bufferLen 
)

void TCPObject::addToTable ( NetSocket  newTag  ) 

void TCPObject::removeFromTable (  ) 

void TCPObject::setPort ( U16  port  )  [inline]

bool TCPObject::onAdd (  )  [virtual]

Called when the object is added to the sim.

Reimplemented from SimObject.

TCPObject::DECLARE_CONOBJECT ( TCPObject   ) 


Member Data Documentation

TCPObject* TCPObject::table[TableSize] [static, private]

U8* TCPObject::mBuffer [protected]

U16 TCPObject::mPort [protected]