Changeset View
Changeset View
Standalone View
Standalone View
libraries/win32/gloox/include/gloox/connectionsocks5proxy.h
/* | /* | ||||
Copyright (c) 2007-2019 by Jakob Schröter <js@camaya.net> | Copyright (c) 2007-2019 by Jakob Schröter <js@camaya.net> | ||||
This file is part of the gloox library. http://camaya.net/gloox | This file is part of the gloox library. http://camaya.net/gloox | ||||
This software is distributed under a license. The full license | This software is distributed under a license. The full license | ||||
agreement can be found in the file LICENSE in this distribution. | agreement can be found in the file LICENSE in this distribution. | ||||
This software may not be copied, modified, sold or distributed | This software may not be copied, modified, sold or distributed | ||||
other than expressed in the named license agreement. | other than expressed in the named license agreement. | ||||
This software is distributed without any warranty. | This software is distributed without any warranty. | ||||
*/ | */ | ||||
#if !defined( GLOOX_MINIMAL ) || defined( WANT_CONNECTIONSOCKS5PROXY ) | |||||
#ifndef CONNECTIONSOCKS5PROXY_H__ | #ifndef CONNECTIONSOCKS5PROXY_H__ | ||||
#define CONNECTIONSOCKS5PROXY_H__ | #define CONNECTIONSOCKS5PROXY_H__ | ||||
#include "gloox.h" | #include "gloox.h" | ||||
#include "connectionbase.h" | #include "connectionbase.h" | ||||
#include "logsink.h" | #include "logsink.h" | ||||
#include <string> | #include <string> | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | public: | ||||
const std::string& server, int port = -1, bool ip = false ); | const std::string& server, int port = -1, bool ip = false ); | ||||
/** | /** | ||||
* Virtual destructor | * Virtual destructor | ||||
*/ | */ | ||||
virtual ~ConnectionSOCKS5Proxy(); | virtual ~ConnectionSOCKS5Proxy(); | ||||
// reimplemented from ConnectionBase | // reimplemented from ConnectionBase | ||||
virtual ConnectionError connect(); | virtual ConnectionError connect( int timeout = -1 ); | ||||
// reimplemented from ConnectionBase | // reimplemented from ConnectionBase | ||||
virtual ConnectionError recv( int timeout = -1 ); | virtual ConnectionError recv( int timeout = -1 ); | ||||
// reimplemented from ConnectionBase | // reimplemented from ConnectionBase | ||||
virtual bool send( const std::string& data ); | virtual bool send( const std::string& data ); | ||||
// reimplemented from ConnectionBase | // reimplemented from ConnectionBase | ||||
virtual bool send( const char* /*data*/, const size_t /*len*/ ) | |||||
{ | |||||
m_logInstance.err( LogAreaClassConnectionSOCKS5Proxy, "Sending binary not implemented" ); | |||||
return false; | |||||
} | |||||
// reimplemented from ConnectionBase | |||||
virtual ConnectionError receive(); | virtual ConnectionError receive(); | ||||
// reimplemented from ConnectionBase | // reimplemented from ConnectionBase | ||||
virtual void disconnect(); | virtual void disconnect(); | ||||
// reimplemented from ConnectionBase | // reimplemented from ConnectionBase | ||||
virtual void cleanup(); | virtual void cleanup(); | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | enum Socks5State | ||||
std::string m_proxyHandshakeBuffer; | std::string m_proxyHandshakeBuffer; | ||||
bool m_ip; | bool m_ip; | ||||
}; | }; | ||||
} | } | ||||
#endif // CONNECTIONSOCKS5PROXY_H__ | #endif // CONNECTIONSOCKS5PROXY_H__ | ||||
#endif // GLOOX_MINIMAL |
Wildfire Games · Phabricator