示例#1
0
        public RpcTcpSimplexConnection(RpcTcpClientChannel channel, TcpUri serverUri, int concurrentConnection)
            : base(RpcConnectionMode.Simplex, RpcConnectionDirection.Client)
        {
            _channel         = channel;
            _serverUri       = serverUri;
            _connections     = new RpcTcpSimplexConnectionWrapper[concurrentConnection];
            _lc              = new LoopCounter(concurrentConnection);
            _connectionCount = new ComboClass <int>(0);

            for (int i = 0; i < concurrentConnection; i++)
            {
                var wrapper = new RpcTcpSimplexConnectionWrapper(this);
                RpcTcpSimplexConnectionManager.AddConnection(wrapper);
                _connections[i] = wrapper;
            }
        }