Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new instance of <see cref="WampRpcClientHandler{TMessage}"/>.
        /// </summary>
        public WampRpcClientHandler(IWampServerProxyFactory <TMessage> serverProxyFactory, IWampConnection <TMessage> connection, IWampFormatter <TMessage> formatter)
        {
            mFormatter   = formatter;
            mServerProxy = serverProxyFactory.Create(new RpcWampClient(this), connection);

            connection.ConnectionClosed += Connection_ConnectionClosed;
            connection.ConnectionError  += Connection_ConnectionError;
        }
 /// <summary>
 /// Creates a new instance of <see cref="WampRpcClientHandler{TMessage}"/>.
 /// </summary>
 public WampRpcClientHandlerBuilder(IWampFormatter <TMessage> formatter, IWampServerProxyFactory <TMessage> serverProxyFactory)
 {
     mFormatter          = formatter;
     mServerProxyFactory = serverProxyFactory;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of <see cref="WampPubSubSubject{TMessage,TEvent}"/>.
 /// </summary>
 /// <param name="topicUri">The topic uri of the current topic.</param>
 /// <param name="serverProxyFactory">The server proxy factory used to get
 /// callbacks from the server.</param>
 /// <param name="connection">The underlying connection this subject uses
 /// in order to send/receive messages.</param>
 /// <param name="formatter">The formatter used in order to serialize/deserialize
 /// the messages sent.</param>
 public WampPubSubSubject(string topicUri, IWampServerProxyFactory <TMessage> serverProxyFactory, IWampConnection <TMessage> connection, IWampFormatter <TMessage> formatter)
 {
     mTopicUri    = topicUri;
     mFormatter   = formatter;
     mServerProxy = serverProxyFactory.Create(new WampPubSubClient(this), connection);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new instance of <see cref="WampPubSubClientFactory{TMessage}"/>.
 /// </summary>
 /// <param name="serverProxyFactory">The server proxy factory used to get callbacks.</param>
 /// <param name="formatter">The formatter used to serialize/deserialize messages.</param>
 public WampPubSubClientFactory(IWampServerProxyFactory <TMessage> serverProxyFactory,
                                IWampFormatter <TMessage> formatter)
 {
     mFormatter          = formatter;
     mServerProxyFactory = serverProxyFactory;
 }