Initial
This commit is contained in:
66
yproxy/YProxyServer.hpp
Normal file
66
yproxy/YProxyServer.hpp
Normal file
@@ -0,0 +1,66 @@
|
||||
#ifndef _YPROXY_YPROXYSERVER_HPP_
|
||||
#define _YPROXY_YPROXYSERVER_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
#ifndef _YPROXY_YPROXYTHREAD_HPP_
|
||||
#include <yproxy/YProxyThread.hpp>
|
||||
#endif
|
||||
#ifndef _SOCKET_SOCKET_HPP_
|
||||
#include <socket/socket.hpp>
|
||||
#endif
|
||||
#ifndef _SOCKET_WSADATA_HPP_
|
||||
#include <socket/wsadata.hpp>
|
||||
#endif
|
||||
#ifndef _SOCKET_INETSOCKETADDRESS_HPP_
|
||||
#include <socket/intsaddr.hpp>
|
||||
#endif
|
||||
|
||||
class YProxyServer
|
||||
{
|
||||
public:
|
||||
YProxyServer();
|
||||
virtual ~YProxyServer();
|
||||
bool start(const String &remoteHost,const String &user,const String &password);
|
||||
protected:
|
||||
virtual void message(const String &message);
|
||||
virtual void acceptHandler(void);
|
||||
virtual void stringHandler(const String &string);
|
||||
private:
|
||||
typedef SmartPointer<YProxyThread> PYProxyThread;
|
||||
enum{RecycleInterval=250};
|
||||
YProxyServer(const YProxyServer &yProxyServer);
|
||||
YProxyServer &operator=(const YProxyServer &yProxyServer);
|
||||
|
||||
static String smHostName;
|
||||
Socket mSocketControl;
|
||||
Socket mPortControl;
|
||||
INETSocketAddress mINETSocketAddress;
|
||||
WSASystem mWSASystem;
|
||||
Block<PYProxyThread> mProxyThreads;
|
||||
};
|
||||
|
||||
inline
|
||||
YProxyServer::YProxyServer()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
YProxyServer::YProxyServer(const YProxyServer &/*yProxy*/)
|
||||
{ // private
|
||||
}
|
||||
|
||||
inline
|
||||
YProxyServer::~YProxyServer()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
YProxyServer &YProxyServer::operator=(const YProxyServer &/*yProxy*/)
|
||||
{ // private
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user