From a31393f368bc78281179e0e2c0ac2a37f7b849c1 Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 12 Aug 2014 20:46:07 +0200 Subject: Fixed (ICE-5586) - Integrate IceWS to the Ice core library --- cpp/src/Ice/Instance.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'cpp/src/Ice/Instance.cpp') 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 #endif +#include + 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); -- cgit v1.2.3