summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/EndpointI.cpp5
-rw-r--r--cpp/src/Ice/Instance.cpp6
-rw-r--r--cpp/src/Ice/Network.cpp4
-rw-r--r--cpp/src/Ice/Network.h4
-rw-r--r--cpp/src/Ice/winrt/StreamTransceiver.cpp2
-rw-r--r--cpp/src/Ice/winrt/StreamTransceiver.h2
6 files changed, 19 insertions, 4 deletions
diff --git a/cpp/src/Ice/EndpointI.cpp b/cpp/src/Ice/EndpointI.cpp
index 9cd4823c9ae..a27c4082faf 100644
--- a/cpp/src/Ice/EndpointI.cpp
+++ b/cpp/src/Ice/EndpointI.cpp
@@ -328,8 +328,9 @@ vector<ConnectorPtr>
IceInternal::EndpointHostResolver::resolve(const string& host, int port, Ice::EndpointSelectionType selType,
const EndpointIPtr& endpoint)
{
- return endpoint->connectors(getAddresses(host, port, _instance->protocolSupport(), selType,
- _instance->preferIPv6(), false));
+ vector<Address> addrs =
+ getAddresses(host, port, _instance->protocolSupport(), selType, _instance->preferIPv6(), false);
+ return endpoint->connectors(addrs, 0);
}
void
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 92c47ef7d20..f5a61cb9995 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -1059,9 +1059,13 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
int defaultIPv6 = 1; // IPv6 enabled by default.
if(!proxyHost.empty())
{
+#ifdef ICE_OS_WINRT
+ throw InitializationException(__FILE__, __LINE__, "SOCKS proxy not supported in WinRT");
+#else
int proxyPort = _initData.properties->getPropertyAsIntWithDefault("Ice.SOCKSProxyPort", 1080);
_networkProxy = new SOCKSNetworkProxy(proxyHost, proxyPort);
defaultIPv6 = 0; // IPv6 is not supported with SOCKS
+#endif
}
bool ipv4 = _initData.properties->getPropertyAsIntWithDefault("Ice.IPv4", 1) > 0;
@@ -1084,10 +1088,12 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
}
_preferIPv6 = _initData.properties->getPropertyAsInt("Ice.PreferIPv6Address") > 0;
+#ifndef ICE_OS_WINRT
if(ipv6 && SOCKSNetworkProxyPtr::dynamicCast(_networkProxy))
{
throw InitializationException(__FILE__, __LINE__, "IPv6 is not supported with SOCKS4 proxies");
}
+#endif
_endpointFactoryManager = new EndpointFactoryManager(this);
#ifndef ICE_OS_WINRT
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index 837a8745d46..b65465858d2 100644
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -547,6 +547,8 @@ IceInternal::AsyncInfo::AsyncInfo(SocketOperation s)
IceUtil::Shared* IceInternal::upCast(NetworkProxy* p) { return p; }
+#ifndef ICE_OS_WINRT
+
IceInternal::SOCKSNetworkProxy::SOCKSNetworkProxy(const string& host, int port) :
_host(host), _port(port)
{
@@ -653,6 +655,8 @@ IceInternal::SOCKSNetworkProxy::getName() const
return "SOCKS";
}
+#endif // ICE_OS_WINRT
+
bool
IceInternal::noMoreFds(int error)
{
diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h
index 934030bb849..247b2331a87 100644
--- a/cpp/src/Ice/Network.h
+++ b/cpp/src/Ice/Network.h
@@ -230,6 +230,8 @@ public:
virtual std::string getName() const = 0;
};
+#ifndef ICE_OS_WINRT
+
class ICE_API SOCKSNetworkProxy : virtual public NetworkProxy
{
public:
@@ -253,6 +255,8 @@ private:
};
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,
diff --git a/cpp/src/Ice/winrt/StreamTransceiver.cpp b/cpp/src/Ice/winrt/StreamTransceiver.cpp
index 9371c890194..b9296fc48bc 100644
--- a/cpp/src/Ice/winrt/StreamTransceiver.cpp
+++ b/cpp/src/Ice/winrt/StreamTransceiver.cpp
@@ -86,7 +86,7 @@ IceInternal::StreamTransceiver::setCompletedHandler(SocketOperationCompletedHand
}
SocketOperation
-IceInternal::StreamTransceiver::initialize()
+IceInternal::StreamTransceiver::initialize(Buffer&, Buffer&)
{
if(_state == StateNeedConnect)
{
diff --git a/cpp/src/Ice/winrt/StreamTransceiver.h b/cpp/src/Ice/winrt/StreamTransceiver.h
index 3c97b7d5095..935c16b67bc 100644
--- a/cpp/src/Ice/winrt/StreamTransceiver.h
+++ b/cpp/src/Ice/winrt/StreamTransceiver.h
@@ -39,7 +39,7 @@ public:
virtual NativeInfoPtr getNativeInfo();
virtual void setCompletedHandler(SocketOperationCompletedHandler^);
- virtual SocketOperation initialize();
+ virtual SocketOperation initialize(Buffer&, Buffer&);
virtual void close();
virtual bool write(Buffer&);
virtual bool read(Buffer&);