00001 #include <sys/socket.h> 00002 00003 #ifndef SERVER_H_ 00004 #define SERVER_H_ 00005 00017 class Server { 00018 public: 00019 Server(int port); 00020 void start(); 00021 void stop(); 00022 00023 private: 00024 int listenFd; 00025 int portno; 00026 int net_bufferSize; 00027 bool running; 00028 int *csock; 00029 void error(const char *msg); 00030 void killConnection(); 00031 void newJob(int* fd); 00032 00033 }; 00034 00035 00036 #endif /* SERVER_H_ */