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
Toshihiro Shimizu 890ddd
class TBaseServer
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TBaseServer(int port);
Toshihiro Shimizu 890ddd
	virtual ~TBaseServer();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void start();
Toshihiro Shimizu 890ddd
	void stop();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual std::string exec(int argc, char *argv[]) = 0;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Toshihiro Shimizu 890ddd
	int extractArgs(char *s, char *argv[]);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	int m_port;
Toshihiro Shimizu 890ddd
	int m_socketId;
Toshihiro Shimizu 890ddd
	bool m_stopped;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	//  TThread::Mutex m_mutex;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif