コード例 #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;
        }
コード例 #2
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);
 }