00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef __INETUSERSERVER_H_
00014 #define __INETUSERSERVER_H_
00015
00016 #include <list>
00017
00018 #include <ServerSocket.h>
00019 #include <Socket.h>
00020 #include <UserPlugin.h>
00021 #include <semaphore.h>
00022
00023
00024 #include "InetUserConnection.h"
00025
00026
00064 class InetUserServer : public UserPlugin
00065 {
00066 friend void *serverThreadEntry( void *usermodule );
00067
00068 public:
00069 InetUserServer( const Config &cfg );
00070 ~InetUserServer();
00071
00072 bool init();
00073
00074 CoreError run();
00075 void shutdown();
00076
00077 private:
00078 void serverThread();
00079
00080 pthread_t serverThreadHandle;
00081 sem_t shutd;
00082 bool running;
00083 ServerSocket *serverSocket;
00084 list<InetUserConnection *> connections;
00085 };
00086
00087
00088
00089
00090 void *serverThreadEntry( void *usermodule );
00091
00092 #endif