00001 #ifndef DDSCHILDSERVER_H
00002 #define DDSCHILDSERVER_H
00003
00005
00006
00007
00008
00009
00010
00011
00012
00014 #include <iosfwd>
00015 #ifndef __CINT__
00016 #include <sys/types.h>
00017 #endif
00018 #include "TInetAddress.h"
00019 #include "TMessage.h"
00020 #include "Persistency/PerInputStreamManager.h"
00021
00022 #include "Dispatcher/DDS.h"
00023
00024 class TSocket;
00025 class MomNavigator;
00026 class DDSChildServer;
00027 class DDSSubscription;
00028 class DDSFileHandler;
00029
00030 std::ostream& operator << (std::ostream& ms, DDSChildServer* cs);
00031
00032 class DDSChildServer {
00033
00034 public:
00035
00036
00037
00038 DDSChildServer (Int_t sockfd, Int_t maxinactive);
00039 virtual ~DDSChildServer ();
00040
00041
00042 bool IsValid () const { return (fTSocket != (TSocket*)0) ? true : false; }
00043 std::ostream& Print(std::ostream& ms) const;
00044
00045
00046 Int_t Run();
00047
00048 private:
00049
00050
00051 void Get();
00052 void GoToFile();
00053 bool IsClientConnected() const;
00054 void Next();
00055 void Shutdown();
00056 void Subscribe();
00057
00058
00059 TSocket* fTSocket;
00060 DDSSubscription* fSubscription;
00061 DDSFileHandler* fFileHandler;
00062 bool fShutdown;
00063 int fPid;
00064
00065
00066
00067 MomNavigator *fMom;
00068 TMessage* fMessageIn;
00069 TMessage fMessageOut;
00070 PerInputStreamManager fInputStreamManager;
00071 TInetAddress fServerAddress;
00072 TInetAddress fClientAddress;
00073 Int_t fMaxInactive;
00074 ClassDef(DDSChildServer,0)
00075
00076 };
00077
00078 #endif // DDSCHILDSERVER_H
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092