ServerProgram.h

См. документацию.
00001 /*
00002  * ServerProgram.h
00003  *
00004  *  Created on: 18.04.2011
00005  *      Author: nick
00006  */
00007 
00008 #ifndef SERVERPROGRAM_H_
00009 #define SERVERPROGRAM_H_
00010 #include <sys/types.h>
00011 #include <sys/socket.h>
00012 #include <netinet/in.h>
00013 #include <arpa/inet.h>
00014 
00015 #include "ServerConfig.h"
00016 #include "XML/Server.h"
00017 #include "BIN/BinaryProtocolServer.h"
00018 
00019 using namespace std;
00020 class ServerProgram {
00021 protected:
00022         ServerConfig* sc;
00023 public:
00024         ServerProgram();
00025         int createSocket(uint16_t port);
00026         int waiteSocketConnection(int i32SocketFD);
00027         virtual ~ServerProgram();
00028         friend void* client_thread_func(void* data );
00029 };
00030 
00031 struct clientData {
00032     ServerProgram* self;
00033     unsigned int i32ConnectFD;
00034     unsigned int i32ConnectFDb;
00035 };
00036 #endif /* SERVERPROGRAM_H_ */