コード例 #1
0
        public ZmqClient(ZMQ.Context zmqContext,
                         string inboundAddress,
                         string outboundAddress)
        {
            this.zmqContext = zmqContext;

            this.inboundAddress  = inboundAddress;
            this.outboundAddress = outboundAddress;

            this.identity = zmqContext.NewIdentity();

            this.nextId           = 0;
            this.requestCallbacks = new ConcurrentDictionary <string, TaskCompletionSource <ResponseData> >();

            this.requestsQueue = new BlockingCollection <byte[]>(new ConcurrentQueue <byte[]>(), int.MaxValue);
        }
コード例 #2
0
ファイル: ZmqServer.cs プロジェクト: 29795113/ServiceProxy
        public ZmqServer(ZMQ.Context zmqContext,
                         string inboundAddress,
                         string outboundAddress,
                         IServiceFactory serviceFactory)
        {
            this.zmqContext = zmqContext;

            this.inboundAddress = inboundAddress;
            this.outboundAddress = outboundAddress;

            this.identity = zmqContext.NewIdentity();

            this.responsesQueue = new BlockingCollection<Tuple<byte[], byte[]>>(new ConcurrentQueue<Tuple<byte[], byte[]>>(), int.MaxValue);

            this.serviceFactory = serviceFactory;
        }
コード例 #3
0
        public ZmqServer(ZMQ.Context zmqContext,
                         string inboundAddress,
                         string outboundAddress,
                         IServiceFactory serviceFactory)
        {
            this.zmqContext = zmqContext;

            this.inboundAddress  = inboundAddress;
            this.outboundAddress = outboundAddress;

            this.identity = zmqContext.NewIdentity();

            this.responsesQueue = new BlockingCollection <Tuple <byte[], byte[]> >(new ConcurrentQueue <Tuple <byte[], byte[]> >(), int.MaxValue);

            this.serviceFactory = serviceFactory;
        }
コード例 #4
0
ファイル: ZmqClient.cs プロジェクト: yonglehou/ServiceProxy
        public ZmqClient(ZMQ.Context zmqContext,
                         string inboundAddress,
                         string outboundAddress)
        {
            this.zmqContext = zmqContext;
            
            this.inboundAddress = inboundAddress;
            this.outboundAddress = outboundAddress;

            this.identity = zmqContext.NewIdentity();

            this.nextId = 0;
            this.requestCallbacks = new ConcurrentDictionary<string, TaskCompletionSource<ResponseData>>();

            this.requestsQueue = new BlockingCollection<byte[]>(new ConcurrentQueue<byte[]>(), int.MaxValue);
        }