/***************************************************************************
                   Socket Control Class Header ( JobControl.h )
                -----------------------------------------

	begin      : 2013/02/20
	copyright  : (C) 2013 Solbox Inc.
	author     : Development 1 Team
					- 2013/02/20 - 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 __SOCKET_CONTROL_H__
#define __SOCKET_CONTROL_H__

#include "BaseSocket.h"

class CSocketControl : public CBaseSocket
{
public:
	CSocketControl();
	CSocketControl( const int & socket, SSL * ssl );

	~CSocketControl();

	int SetOption();

	ssize_t ReadData(void *vptr, size_t n);
	ssize_t ReadDataEx(void *vptr, size_t n);
	ssize_t WriteData(void *vptr, size_t n);

	ssize_t ReadnSSL(void *vptr, size_t n);
	ssize_t WritenSSL(void *vptr, size_t n);

	ssize_t ReadTimeout(void *vptr, size_t n, int timeout = DEFAULT_DATA_RECEIVE_TIMEOUT);
	ssize_t ReadSSL(void *vptr, size_t n);

	string	GetMyIPString();
protected:

private:
	SSL*	m_ssl;
};

#endif // __SOCKET_CONTROL_H__
