Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TBASESERVER_H
Toshihiro Shimizu 890ddd
#define TBASESERVER_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include <string></string>
Toshihiro Shimizu 890ddd
//#include "tthread.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//---------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
class TBaseServer {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TBaseServer(int port);
Shinya Kitaoka 120a6e
  virtual ~TBaseServer();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void start();
Shinya Kitaoka 120a6e
  void stop();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  virtual std::string exec(int argc, char *argv[]) = 0;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  int extractArgs(char *s, char *argv[]);
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  int m_port;
Shinya Kitaoka 120a6e
  int m_socketId;
Shinya Kitaoka 120a6e
  bool m_stopped;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  //  TThread::Mutex m_mutex;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif