Пример #1
0
        /// <summary>
        /// Creates a new channel with the given information, already established connection,
        /// and optionally the given backlog.
        /// </summary>
        public static async Task <RpcChannel> Create(RpcPeerInfo remoteInfo, IRpcConnection connection,
                                                     IRpcMethodExecutor executor, IRpcBacklog?backlog = null)
        {
            var ret = new RpcChannel(remoteInfo, connection, executor);

            ret.callsQueue = await RpcQueue.Create(remoteInfo.PeerID, backlog);

            return(ret);
        }
Пример #2
0
 /// <summary>
 /// Use <see cref="Create"/> for creating new instances.
 /// </summary>
 private RpcChannel(RpcPeerInfo remotePeer, IRpcConnection connection, IRpcMethodExecutor executor)
 {
     RemotePeer      = remotePeer;
     this.connection = connection;
     this.executor   = executor;
 }