#ifndef _YPROXY_YPROXYSERVER_HPP_ #define _YPROXY_YPROXYSERVER_HPP_ #ifndef _COMMON_WINDOWS_HPP_ #include #endif #ifndef _COMMON_SMARTPOINTER_HPP_ #include #endif #ifndef _YPROXY_YPROXYTHREAD_HPP_ #include #endif #ifndef _SOCKET_SOCKET_HPP_ #include #endif #ifndef _SOCKET_WSADATA_HPP_ #include #endif #ifndef _SOCKET_INETSOCKETADDRESS_HPP_ #include #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 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 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