Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/nto/bakJuly/MsgThread.hpp

Go to the documentation of this file.
00001 #ifndef __J2K__MsgThread_HPP__
00002 #define __J2K__MsgThread_HPP__
00003 
00004 #include <stdio.h>
00005 #include <errno.h>
00006 #include <stdlib.h>
00007 #include <sys/dispatch.h>
00008 
00009 #include <j2k/Fred/Standard.hpp>
00010 #include <j2k/nto/Basic_PThread.hpp>
00011 #include <j2k/nto/Message.hpp>
00012 #include <j2k/nto/NameSpace.hpp>
00013 
00014 enum MsgThreadType_t
00015 {
00016   server = 0,
00017   client = 1
00018 };
00019 
00020 class MsgThread : public Basic_PThread 
00021 { 
00022 protected:
00023   int fd;
00024   int connected;
00025   NameSpace* n;
00026   Message*   message;
00027   Message*   replyMsg;
00028   MsgThreadType_t user;
00029 
00030 public:
00031   MsgThread( NameSpace* n0, MsgThreadType_t user0 = client );
00032   virtual ~MsgThread();
00033 
00034   void connect( const char* name = NULL );
00035 
00036   void disconnect();
00037 
00038   int handleReceive( int rcvid, int replyData = 0 );
00039   int receive();
00040   void send( int data );
00041   void reply( int rcvid, int data );
00042   virtual void run() = 0;
00043 };
00044 
00045 #endif  // MsgThread.hpp

Generated on Sun Oct 14 18:46:36 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001