EchoServer Class Reference

#include <EchoServer.h>

List of all members.

Public Member Functions

 EchoServer ()
virtual ~EchoServer ()
virtual OStatus DoInit (const OSystemEvent &event)
virtual OStatus DoStart (const OSystemEvent &event)
virtual OStatus DoStop (const OSystemEvent &event)
virtual OStatus DoDestroy (const OSystemEvent &event)
void ListenCont (ANTENVMSG msg)
void SendCont (ANTENVMSG msg)
void ReceiveCont (ANTENVMSG msg)
void CloseCont (ANTENVMSG msg)

Public Attributes

OSubject * subject [numOfSubject]
OObserver * observer [numOfObserver]

Private Member Functions

OStatus Listen (int index)
OStatus Send (int index)
OStatus Receive (int index)
OStatus Close (int index)
OStatus InitTCPConnection (int index)
void SetSendData (int index)
void SetReceiveData (int index)

Private Attributes

antStackRef ipstackRef
TCPConnection connection [ECHOSERVER_CONNECTION_MAX]


Constructor & Destructor Documentation

EchoServer::EchoServer  ) 
 

Definition at line 21 of file EchoServer.cc.

virtual EchoServer::~EchoServer  )  [inline, virtual]
 

Definition at line 25 of file EchoServer.h.


Member Function Documentation

OStatus EchoServer::Close int  index  )  [private]
 

Definition at line 212 of file EchoServer.cc.

References connection, CONNECTION_CLOSED, ipstackRef, and TCPConnection::state.

Referenced by ListenCont(), ReceiveCont(), and SendCont().

void EchoServer::CloseCont ANTENVMSG  msg  ) 
 

Definition at line 231 of file EchoServer.cc.

References connection, Listen(), and TCPConnection::state.

OStatus EchoServer::DoDestroy const OSystemEvent &  event  )  [virtual]
 

Definition at line 57 of file EchoServer.cc.

OStatus EchoServer::DoInit const OSystemEvent &  event  )  [virtual]
 

Definition at line 26 of file EchoServer.cc.

OStatus EchoServer::DoStart const OSystemEvent &  event  )  [virtual]
 

Definition at line 33 of file EchoServer.cc.

References InitTCPConnection(), ipstackRef, and Listen().

OStatus EchoServer::DoStop const OSystemEvent &  event  )  [virtual]
 

Definition at line 50 of file EchoServer.cc.

OStatus EchoServer::InitTCPConnection int  index  )  [private]
 

Definition at line 244 of file EchoServer.cc.

References byte, connection, ECHOSERVER_BUFFER_SIZE, ipstackRef, TCPConnection::recvBuffer, TCPConnection::recvData, TCPConnection::sendBuffer, TCPConnection::sendData, and TCPConnection::state.

Referenced by DoStart().

OStatus EchoServer::Listen int  index  )  [private]
 

Definition at line 63 of file EchoServer.cc.

References connection, ECHOSERVER_BUFFER_SIZE, ECHOSERVER_PORT, TCPConnection::endpoint, IP_ADDR_ANY(), ipstackRef, and TCPConnection::state.

Referenced by CloseCont(), and DoStart().

void EchoServer::ListenCont ANTENVMSG  msg  ) 
 

Definition at line 100 of file EchoServer.cc.

References Close(), connection, Receive(), SetReceiveData(), and TCPConnection::state.

OStatus EchoServer::Receive int  index  )  [private]
 

Definition at line 169 of file EchoServer.cc.

References connection, CONNECTION_CONNECTED, ipstackRef, and TCPConnection::state.

Referenced by ListenCont(), and SendCont().

void EchoServer::ReceiveCont ANTENVMSG  msg  ) 
 

Definition at line 188 of file EchoServer.cc.

References Close(), connection, Send(), TCPConnection::sendSize, and SetSendData().

OStatus EchoServer::Send int  index  )  [private]
 

Definition at line 123 of file EchoServer.cc.

References connection, ipstackRef, TCPConnection::sendSize, and TCPConnection::state.

Referenced by ReceiveCont().

void EchoServer::SendCont ANTENVMSG  msg  ) 
 

Definition at line 145 of file EchoServer.cc.

References Close(), connection, Receive(), SetReceiveData(), and TCPConnection::state.

void EchoServer::SetReceiveData int  index  )  [private]
 

Definition at line 299 of file EchoServer.cc.

References connection, and TCPConnection::recvSize.

Referenced by ListenCont(), and SendCont().

void EchoServer::SetSendData int  index  )  [private]
 

Definition at line 292 of file EchoServer.cc.

References connection, and memcpy().

Referenced by ReceiveCont().


Member Data Documentation

TCPConnection EchoServer::connection[ECHOSERVER_CONNECTION_MAX] [private]
 

Definition at line 51 of file EchoServer.h.

Referenced by Close(), CloseCont(), InitTCPConnection(), Listen(), ListenCont(), Receive(), ReceiveCont(), Send(), SendCont(), SetReceiveData(), and SetSendData().

antStackRef EchoServer::ipstackRef [private]
 

Definition at line 50 of file EchoServer.h.

Referenced by Close(), DoStart(), InitTCPConnection(), Listen(), Receive(), and Send().

OObserver* EchoServer::observer[numOfObserver]
 

Definition at line 28 of file EchoServer.h.

OSubject* EchoServer::subject[numOfSubject]
 

Definition at line 27 of file EchoServer.h.


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 23:04:33 2007 for openSDK by  doxygen 1.3.9.1