diff --git a/src/net45/Default/WampSharp.WebSocket4Net/WAMP2/V2/Fluent/WebSocket4NetActivator.cs b/src/net45/Default/WampSharp.WebSocket4Net/WAMP2/V2/Fluent/WebSocket4NetActivator.cs index fbdd6cfe4..7c4758bb3 100644 --- a/src/net45/Default/WampSharp.WebSocket4Net/WAMP2/V2/Fluent/WebSocket4NetActivator.cs +++ b/src/net45/Default/WampSharp.WebSocket4Net/WAMP2/V2/Fluent/WebSocket4NetActivator.cs @@ -61,7 +61,7 @@ private IControlledWampConnection GetConnectionFactory(IWamp protected IControlledWampConnection CreateBinaryConnection(IWampBinaryBinding binaryBinding) { - return new WebSocket4NetBinaryConnection(mWebSocketFactory(binaryBinding.Name), binaryBinding); + return new WebSocket4NetBinaryConnection(ActivateWebSocket(binaryBinding), binaryBinding); } protected IControlledWampConnection CreateTextConnection(IWampTextBinding textBinding) @@ -69,6 +69,18 @@ protected IControlledWampConnection CreateTextConnection(IWa return new WebSocket4NetTextConnection(ActivateWebSocket(textBinding), textBinding); } + private WebSocket ActivateWebSocket(IWampBinaryBinding binaryBinding) + { + WebSocket webSocket = mWebSocketFactory(binaryBinding.Name); + + if (SecurityOptionsConfigureAction != null) + { + SecurityOptionsConfigureAction(webSocket.Security); + } + + return webSocket; + } + private WebSocket ActivateWebSocket(IWampTextBinding textBinding) { WebSocket webSocket = mWebSocketFactory(textBinding.Name);