public static ChannelFactorySyntax.IAuthenticationSyntax CraAuthentication(this ChannelFactorySyntax.ISerializationSyntax serializationSyntax, string authenticationId, string secret, string salt = null, int?iterations = null, int?keyLen = null)
        {
            ChannelState state = serializationSyntax.State;

            state.Authenticator = new WampCraClientAuthenticator(authenticationId, secret, salt, iterations, keyLen);

            return(state);
        }
예제 #2
0
        /// <summary>
        /// Indicates that the user wants to use Msgpack serialization.
        /// </summary>
        /// <param name="transportSyntax">The current fluent syntax state.</param>
        /// <param name="serializer">The <see cref="JsonSerializer"/> to serialize messages with.</param>
        public static ChannelFactorySyntax.ISerializationSyntax MsgpackSerialization(this ChannelFactorySyntax.ITransportSyntax transportSyntax, JsonSerializer serializer)
        {
            ChannelState state = transportSyntax.State;

            state.Binding = new JTokenMsgpackBinding(serializer);

            return(state);
        }
예제 #3
0
        /// <summary>
        /// Indicates that the user wants to use Msgpack serialization.
        /// </summary>
        public static ChannelFactorySyntax.ISerializationSyntax MsgpackSerialization(this ChannelFactorySyntax.ITransportSyntax transportSyntax)
        {
            ChannelState state = transportSyntax.State;

            state.Binding = mMsgpackBinding;

            return(state);
        }
예제 #4
0
        public static ChannelFactorySyntax.ITransportSyntax WebSocketTransport(
            this ChannelFactorySyntax.IRealmSyntax realmSyntax, Uri address)
        {
            ChannelState state = realmSyntax.State;

            state.ConnectionActivator = new WebSocketActivator(address);

            return(state);
        }
예제 #5
0
        /// <summary>
        /// Indicates that the user wants to use a given <see cref="IWampClientAuthenticator"/>.
        /// </summary>
        /// <param name="authenticator">The given <see cref="IWampClientAuthenticator"/>.</param>
        public static ChannelFactorySyntax.IAuthenticationSyntax Authenticator(this ChannelFactorySyntax.ISerializationSyntax serializationSyntax,
                                                                               IWampClientAuthenticator authenticator)
        {
            ChannelState state = serializationSyntax.State;

            state.Authenticator = authenticator;

            return(state);
        }
예제 #6
0
        private static IWebSocket4NetTransportSyntax GetWebSocketSyntax(ChannelFactorySyntax.IRealmSyntax realmSyntax, WebSocket4NetActivator activator)
        {
            ChannelState state = realmSyntax.State;

            state.ConnectionActivator = activator;

            WebSocket4NetTransportSyntax syntax = new WebSocket4NetTransportSyntax(state);

            return(syntax);
        }
예제 #7
0
        private static IRawSocketTransportSyntax InnerRawSocket(ChannelFactorySyntax.IRealmSyntax realmSyntax, Func <TcpClient, Task> connector)
        {
            ChannelState state = realmSyntax.State;

            RawSocketActivator activator = new RawSocketActivator();

            activator.Connector       = connector;
            state.ConnectionActivator = activator;

            return(new RawSocketTransportSyntax(state));
        }
        private static IWebSocketTransportSyntax GetWebSocketTransportSyntax
            (ChannelFactorySyntax.IRealmSyntax realmSyntax,
            IWampConnectionActivator connectionActivator)
        {
            ChannelState state = realmSyntax.State;

            state.ConnectionActivator = connectionActivator;

            WebSocketTransportSyntax result = new WebSocketTransportSyntax(state);

            return(result);
        }
        private static ChannelFactorySyntax.IObserveOnSyntax InnerObserveOn <TSyntax>
            (this TSyntax serializationSyntax, IScheduler scheduler)
            where TSyntax : ChannelFactorySyntax.ISyntaxState,
        ChannelFactorySyntax.IBuildableSyntax
        {
            ChannelState state = serializationSyntax.State;

            state.ConnectionActivator =
                new ScheduledWampConnectionActivator(state.ConnectionActivator, scheduler);

            return(state);
        }
예제 #10
0
 public RawSocketTransportSyntax(ChannelState state)
 {
     State = state;
 }
 public WebSocket4NetTransportSyntax(ChannelState state)
 {
     State = state;
 }