UDPEchoServer.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2002,2003 Sony Corporation 
00003 //
00004 // Permission to use, copy, modify, and redistribute this software for
00005 // non-commercial use is hereby granted.
00006 //
00007 // This software is provided "as is" without warranty of any kind,
00008 // either expressed or implied, including but not limited to the
00009 // implied warranties of fitness for a particular purpose.
00010 //
00011 
00012 #ifndef UDPEchoServer_h_DEFINED
00013 #define UDPEchoServer_h_DEFINED
00014 
00015 #include <OPENR/OObject.h>
00016 #include <OPENR/OSubject.h>
00017 #include <OPENR/OObserver.h>
00018 #include "UDPConnection.h"
00019 #include "UDPEchoServerConfig.h"
00020 #include "def.h"
00021 
00022 class UDPEchoServer : public OObject {
00023 public:
00024     UDPEchoServer();
00025     virtual ~UDPEchoServer() {}
00026 
00027     OSubject*   subject[numOfSubject];
00028     OObserver*  observer[numOfObserver];     
00029 
00030     virtual OStatus DoInit   (const OSystemEvent& event);
00031     virtual OStatus DoStart  (const OSystemEvent& event);
00032     virtual OStatus DoStop   (const OSystemEvent& event);
00033     virtual OStatus DoDestroy(const OSystemEvent& event);
00034 
00035     void SendCont   (ANTENVMSG msg);
00036     void ReceiveCont(ANTENVMSG msg);
00037     void CloseCont  (ANTENVMSG msg);
00038 
00039 private:
00040     OStatus Bind   (int index);
00041     OStatus Send   (int index);
00042     OStatus Receive(int index);
00043     OStatus Close  (int index);
00044     OStatus InitUDPBuffer(int index);
00045     OStatus CreateUDPEndpoint(int index);
00046 
00047     antStackRef    ipstackRef;
00048     UDPConnection  connection[UDPECHOSERVER_CONNECTION_MAX];
00049 };
00050 
00051 #endif // UDPEchoServer_h_DEFINED

Generated on Sun Dec 2 23:04:31 2007 for openSDK by  doxygen 1.3.9.1