/***************************************************************************
                   Client Class Header ( Config.h )
                -----------------------------------------

	begin      : 2013/02/19
	copyright  : (C) 2013 Solbox Inc.
	author     : Development 1 Team
					- 2013/02/19 - 1st dadamin
	email      : dev1@solbox.com
	version    : 3.2.0

	CopyRight(C) 2005 Solbox Inc. All Rights reserved.
	Redistribution and use in source and binary forms, with or with out
	modification, are not permitted in outside of Solbox Inc.
***************************************************************************/
#ifndef __CLINET_H__
#define __CLINET_H__

#include "JobControl.h"

class CServiceInfo;
class CParser;

class CClient
{
public:
	CClient();
	CClient(int clientsd, SSL * ssl);
	~CClient();

	int Run(CServiceInfo & info);

	int SetSocket();
	int ReadHeader();
	int ReadBody();
	int AnalyzeJob();
	void SendtoClient(int nCode);

	int Client2JobData();
protected:
	int acceptSSL();

private:
	static void *_entry_func(void *arg);	
	
	int	m_sfd;
	SSL* m_ssl;

	CParser * m_parser;
	CJobControl	m_job;
};

#endif // __CLINET_H__
