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);
        }
Beispiel #2
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;
        }
        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;
        }
Beispiel #4
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);
        }