mtserver.h

Go to the documentation of this file.
00001 
00035 #ifndef ABA_MTSERVER_H
00036 #define ABA_MTSERVER_H
00037 
00038 #include "abacus/abacusroot.h"
00039 #include "abacus/message.h"
00040 
00041 #include <ace/Task.h>
00042 #include <ace/SOCK_Acceptor.h>
00043 
00044 class ABA_MASTER;
00045 
00046 
00047   class  ABA_MTSERVER :  public ACE_Task<ACE_MT_SYNCH>, public ABA_ABACUSROOT  {
00048     public/
00049 
00056       ABA_MTSERVER(ABA_MASTER *master, int port, int nThreads);
00057 
00059       ~ABA_MTSERVER();
00060 
00065       int open (void*);
00066       int close (u_long);
00067  
00070       int svc();
00071 
00072     protected:
00073       ABA_MASTER *master_;
00074       int         port_;
00075       int         nThreads_;
00076       ACE_SOCK_Acceptor acceptor_;
00077 
00084       virtual bool svcMessage(ABA_MESSAGE& msg) = 0;
00085   };
00086 
00087 
00088 inline int ABA_MTSERVER::close(u_long) { return 0; }
00089 
00090 #endif  // ABA_MTSERVER_H
00091 

Generated on Tue Aug 14 18:09:54 2007 for ABACUS by  doxygen 1.5.1