UDPEchoServer Class Reference

#include <UDPEchoServer.h>

List of all members.

Public Member Functions

 UDPEchoServer ()
virtual ~UDPEchoServer ()
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 SendCont (ANTENVMSG msg)
void ReceiveCont (ANTENVMSG msg)
void CloseCont (ANTENVMSG msg)

Public Attributes

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

Private Member Functions

OStatus Bind (int index)
OStatus Send (int index)
OStatus Receive (int index)
OStatus Close (int index)
OStatus InitUDPBuffer (int index)
OStatus CreateUDPEndpoint (int index)

Private Attributes

antStackRef ipstackRef
UDPConnection connection [UDPECHOSERVER_CONNECTION_MAX]


Constructor & Destructor Documentation

UDPEchoServer::UDPEchoServer  ) 
 

Definition at line 21 of file UDPEchoServer.cc.

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

Definition at line 25 of file UDPEchoServer.h.


Member Function Documentation

OStatus UDPEchoServer::Bind int  index  )  [private]
 

Definition at line 329 of file UDPEchoServer.cc.

References connection, IP_ADDR_ANY(), ipstackRef, Receive(), UDPConnection::recvSize, UDPConnection::state, and UDPECHOSERVER_PORT.

Referenced by CloseCont(), and DoStart().

OStatus UDPEchoServer::Close int  index  )  [private]
 

Definition at line 207 of file UDPEchoServer.cc.

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

Referenced by ReceiveCont(), and SendCont().

void UDPEchoServer::CloseCont ANTENVMSG  msg  ) 
 

Definition at line 226 of file UDPEchoServer.cc.

References Bind(), connection, CreateUDPEndpoint(), and UDPConnection::state.

OStatus UDPEchoServer::CreateUDPEndpoint int  index  )  [private]
 

Definition at line 303 of file UDPEchoServer.cc.

References connection, UDPConnection::endpoint, ipstackRef, UDPConnection::state, and UDPECHOSERVER_BUFFER_SIZE.

Referenced by CloseCont(), and DoStart().

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

Definition at line 89 of file UDPEchoServer.cc.

References connection, ipstackRef, UDPConnection::recvBuffer, and UDPConnection::sendBuffer.

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

Definition at line 26 of file UDPEchoServer.cc.

References InitUDPBuffer(), and ipstackRef.

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

Definition at line 41 of file UDPEchoServer.cc.

References Bind(), and CreateUDPEndpoint().

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

Definition at line 70 of file UDPEchoServer.cc.

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

OStatus UDPEchoServer::InitUDPBuffer int  index  )  [private]
 

Definition at line 254 of file UDPEchoServer.cc.

References byte, connection, ipstackRef, UDPConnection::recvBuffer, UDPConnection::recvData, UDPConnection::recvSize, UDPConnection::sendBuffer, UDPConnection::sendData, UDPConnection::state, and UDPECHOSERVER_BUFFER_SIZE.

Referenced by DoInit().

OStatus UDPEchoServer::Receive int  index  )  [private]
 

Definition at line 156 of file UDPEchoServer.cc.

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

Referenced by Bind(), and SendCont().

void UDPEchoServer::ReceiveCont ANTENVMSG  msg  ) 
 

Definition at line 175 of file UDPEchoServer.cc.

References Close(), connection, memcpy(), Send(), UDPConnection::sendAddress, UDPConnection::sendPort, UDPConnection::sendSize, and UDPConnection::state.

OStatus UDPEchoServer::Send int  index  )  [private]
 

Definition at line 107 of file UDPEchoServer.cc.

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

Referenced by ReceiveCont().

void UDPEchoServer::SendCont ANTENVMSG  msg  ) 
 

Definition at line 129 of file UDPEchoServer.cc.

References Close(), connection, Receive(), UDPConnection::recvSize, and UDPConnection::state.


Member Data Documentation

UDPConnection UDPEchoServer::connection[UDPECHOSERVER_CONNECTION_MAX] [private]
 

Definition at line 48 of file UDPEchoServer.h.

Referenced by Bind(), Close(), CloseCont(), CreateUDPEndpoint(), DoDestroy(), DoStop(), InitUDPBuffer(), Receive(), ReceiveCont(), Send(), and SendCont().

antStackRef UDPEchoServer::ipstackRef [private]
 

Definition at line 47 of file UDPEchoServer.h.

Referenced by Bind(), Close(), CreateUDPEndpoint(), DoDestroy(), DoInit(), DoStop(), InitUDPBuffer(), Receive(), and Send().

OObserver* UDPEchoServer::observer[numOfObserver]
 

Definition at line 28 of file UDPEchoServer.h.

OSubject* UDPEchoServer::subject[numOfSubject]
 

Definition at line 27 of file UDPEchoServer.h.


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