summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Network.h
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-09-10 08:47:19 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-09-10 08:47:19 +0200
commitb6c9d9a880f6f1a6908a3c62dfccdce3e68dad80 (patch)
treed3e9e9340064538a8dc7a645260d0eb3cdf55d63 /cpp/src/Ice/Network.h
parentUndo bogus change from an earlier commit. (diff)
downloadice-b6c9d9a880f6f1a6908a3c62dfccdce3e68dad80.tar.bz2
ice-b6c9d9a880f6f1a6908a3c62dfccdce3e68dad80.tar.xz
ice-b6c9d9a880f6f1a6908a3c62dfccdce3e68dad80.zip
ICE-5582 (SOCKs test), ICE-5314 (HTTP proxies), major refactoring of networking code (addition of StreamSocket class abstraction)
Diffstat (limited to 'cpp/src/Ice/Network.h')
-rw-r--r--cpp/src/Ice/Network.h70
1 files changed, 2 insertions, 68 deletions
diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h
index dfb07151099..179ebab9582 100644
--- a/cpp/src/Ice/Network.h
+++ b/cpp/src/Ice/Network.h
@@ -17,6 +17,7 @@
#include <Ice/Config.h>
#include <Ice/NetworkF.h>
+#include <Ice/NetworkProxyF.h>
#include <Ice/PropertiesF.h> // For setTcpBufSize
#include <Ice/LoggerF.h> // For setTcpBufSize
#include <Ice/Protocol.h>
@@ -207,73 +208,6 @@ protected:
};
typedef IceUtil::Handle<NativeInfo> NativeInfoPtr;
-class ICE_API NetworkProxy : virtual public IceUtil::Shared
-{
-public:
-
- //
- // Write the connection request on the connection established
- // with the network proxy server. This is called right after
- // the connection establishment succeeds.
- //
- virtual void beginWriteConnectRequest(const Address&, Buffer&) = 0;
- virtual void endWriteConnectRequest(Buffer&) = 0;
-
- //
- // Once the connection request has been sent, this is called
- // to prepare and read the response from the proxy server.
- //
- virtual void beginReadConnectRequestResponse(Buffer&) = 0;
- virtual void endReadConnectRequestResponse(Buffer&) = 0;
-
- //
- // If the proxy host needs to be resolved, this should return
- // a new NetworkProxy containing the IP address of the proxy.
- // This is called from the endpoint host resolver thread, so
- // it's safe if this this method blocks.
- //
- virtual NetworkProxyPtr resolveHost() const = 0;
-
- //
- // Returns the IP address of the network proxy. This method
- // must not block. It's only called on a network proxy object
- // returned by resolveHost().
- //
- virtual Address getAddress() const = 0;
-
- //
- // Returns the name of the proxy, used for tracing purposes.
- //
- virtual std::string getName() const = 0;
-};
-
-#ifndef ICE_OS_WINRT
-
-class ICE_API SOCKSNetworkProxy : virtual public NetworkProxy
-{
-public:
-
- SOCKSNetworkProxy(const std::string&, int);
- SOCKSNetworkProxy(const Address&);
-
- virtual void beginWriteConnectRequest(const Address&, Buffer&);
- virtual void endWriteConnectRequest(Buffer&);
- virtual void beginReadConnectRequestResponse(Buffer&);
- virtual void endReadConnectRequestResponse(Buffer&);
- virtual NetworkProxyPtr resolveHost() const;
- virtual Address getAddress() const;
- virtual std::string getName() const;
-
-private:
-
- std::string _host;
- int _port;
- Address _address;
-};
-typedef IceUtil::Handle<SOCKSNetworkProxy> SOCKSNetworkProxyPtr;
-
-#endif // ICE_OS_WINRT
-
ICE_API bool noMoreFds(int);
ICE_API std::string errorToStringDNS(int);
ICE_API std::vector<Address> getAddresses(const std::string&, int, ProtocolSupport, Ice::EndpointSelectionType, bool,
@@ -290,7 +224,7 @@ ICE_API void closeSocket(SOCKET);
ICE_API std::string addrToString(const Address&);
ICE_API void fdToLocalAddress(SOCKET, Address&);
ICE_API bool fdToRemoteAddress(SOCKET, Address&);
-ICE_API std::string fdToString(SOCKET, const NetworkProxyPtr&, const Address&, bool);
+ICE_API std::string fdToString(SOCKET, const NetworkProxyPtr&, const Address&);
ICE_API std::string fdToString(SOCKET);
ICE_API void fdToAddressAndPort(SOCKET, std::string&, int&, std::string&, int&);
ICE_API void addrToAddressAndPort(const Address&, std::string&, int&);