summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2014-08-12 20:46:07 +0200
committerJose <jose@zeroc.com>2014-08-12 20:46:07 +0200
commita31393f368bc78281179e0e2c0ac2a37f7b849c1 (patch)
treea9b8ba6e228142bb522c976a766f41349b502bff /cpp/src/Ice/Instance.cpp
parentAdded eclipse project settings for java. (diff)
downloadice-a31393f368bc78281179e0e2c0ac2a37f7b849c1.tar.bz2
ice-a31393f368bc78281179e0e2c0ac2a37f7b849c1.tar.xz
ice-a31393f368bc78281179e0e2c0ac2a37f7b849c1.zip
Fixed (ICE-5586) - Integrate IceWS to the Ice core library
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 6d1076e950b..b1561236075 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -69,6 +69,8 @@
# include <Ice/winrt/StreamEndpointI.h>
#endif
+#include <Ice/WSEndpointI.h>
+
using namespace std;
using namespace Ice;
using namespace IceInternal;
@@ -1165,18 +1167,29 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
EndpointFactoryPtr tcpEndpointFactory = new TcpEndpointFactory(tcpProtocolInstance);
_endpointFactoryManager->add(tcpEndpointFactory);
#else
- ProtocolInstancePtr tcpInstance = new ProtocolInstance(this, TCPEndpointType, "tcp");
- EndpointFactoryPtr tcpFactory = new StreamEndpointFactory(tcpInstance);
- _endpointFactoryManager->add(tcpFactory);
+ ProtocolInstancePtr tcpProtocolInstance = new ProtocolInstance(this, TCPEndpointType, "tcp");
+ EndpointFactoryPtr tcpEndpointFactory = new StreamEndpointFactory(tcpProtocolInstance);
+ _endpointFactoryManager->add(tcpEndpointFactory);
- ProtocolInstancePtr sslInstance = new ProtocolInstance(this, IceSSL::EndpointType, "ssl");
- EndpointFactoryPtr sslFactory = new StreamEndpointFactory(sslInstance);
- _endpointFactoryManager->add(sslFactory);
+ ProtocolInstancePtr sslProtocolInstance = new ProtocolInstance(this, IceSSL::EndpointType, "ssl");
+ EndpointFactoryPtr sslEndpointFactory = new StreamEndpointFactory(sslProtocolInstance);
+ _endpointFactoryManager->add(sslEndpointFactory);
+
+ ProtocolInstancePtr wssProtocolInstance = new ProtocolInstance(this, WSSEndpointType, "wss");
+ EndpointFactoryPtr wssEndpointFactory = new WSEndpointFactoryI(wssProtocolInstance,
+ sslEndpointFactory->clone(wssProtocolInstance));
+ _endpointFactoryManager->add(wssEndpointFactory);
#endif
ProtocolInstancePtr udpProtocolInstance = new ProtocolInstance(this, UDPEndpointType, "udp");
EndpointFactoryPtr udpEndpointFactory = new UdpEndpointFactory(udpProtocolInstance);
_endpointFactoryManager->add(udpEndpointFactory);
+ ProtocolInstancePtr wsProtocolInstance = new ProtocolInstance(this, WSEndpointType, "ws");
+ EndpointFactoryPtr wsEndpointFactory = new WSEndpointFactoryI(wsProtocolInstance,
+ tcpEndpointFactory->clone(wsProtocolInstance));
+
+ _endpointFactoryManager->add(wsEndpointFactory);
+
_dynamicLibraryList = new DynamicLibraryList;
_pluginManager = new PluginManagerI(communicator, _dynamicLibraryList);