Пример #1
0
 public Context()
 {
     context = ZmqContext.Create();
     SetUpOutputChannel(context);
     pipe = new Pipe(context);
     ConfigureEsentDatabase();
     this.EsentInstance = GetEsentInstance();
 }
Пример #2
0
        public ZmqPollBroker(ZeroMQ.ZmqContext zmqContext,
                         string frontendAddress,
                         string backendAddress)
        {
            this.zmqContext = zmqContext;

            this.frontendAddress = frontendAddress;
            this.backendAddress = backendAddress;
        }
Пример #3
0
        public ZmqPollBroker(ZeroMQ.ZmqContext zmqContext,
                             string frontendAddress,
                             string backendAddress)
        {
            this.zmqContext = zmqContext;

            this.frontendAddress = frontendAddress;
            this.backendAddress  = backendAddress;
        }
Пример #4
0
        public ZmqPollServer(ZeroMQ.ZmqContext zmqContext,
                         string brokerBackendAddress,
                         IServiceFactory serviceFactory)
        {
            this.zmqContext = zmqContext;

            this.brokerBackendAddress = brokerBackendAddress;

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

            this.serviceFactory = serviceFactory;
        }
Пример #5
0
        public ZmqPollClient(ZeroMQ.ZmqContext zmqContext,
                         string brokerFrontendAddress)
        {
            this.zmqContext = zmqContext;

            this.brokerFrontendAddress = brokerFrontendAddress;

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

            this.requestsQueue = new BlockingCollection<byte[]>(new ConcurrentQueue<byte[]>(), int.MaxValue);
        }
Пример #6
0
        public ZmqPollClient(ZeroMQ.ZmqContext zmqContext,
                             string brokerFrontendAddress)
        {
            this.zmqContext = zmqContext;

            this.brokerFrontendAddress = brokerFrontendAddress;

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

            this.requestsQueue = new BlockingCollection <byte[]>(new ConcurrentQueue <byte[]>(), int.MaxValue);
        }
Пример #7
0
        public ZmqBroker(ZeroMQ.ZmqContext zmqContext,
                         string clientInboundAddress,
                         string clientOutboundAddress,
                         string serverInboundAddress,
                         string serverOutboundAddress)
        {
            this.zmqContext = zmqContext;

            this.clientInboundAddress  = clientInboundAddress;
            this.clientOutboundAddress = clientOutboundAddress;
            this.serverInboundAddress  = serverInboundAddress;
            this.serverOutboundAddress = serverOutboundAddress;
        }
Пример #8
0
        public ZmqBroker(ZeroMQ.ZmqContext zmqContext,
                         string clientInboundAddress,
                         string clientOutboundAddress,
                         string serverInboundAddress,
                         string serverOutboundAddress)
        {
            this.zmqContext = zmqContext;

            this.clientInboundAddress = clientInboundAddress;
            this.clientOutboundAddress = clientOutboundAddress;
            this.serverInboundAddress = serverInboundAddress;
            this.serverOutboundAddress = serverOutboundAddress;
        }
Пример #9
0
        public ZmqServer(ZeroMQ.ZmqContext 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;
        }
Пример #10
0
        public ZmqClient(ZeroMQ.ZmqContext 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);
        }
Пример #11
0
        public ZmqClient(ZeroMQ.ZmqContext 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);
        }
Пример #12
0
        public ZmqServer(ZeroMQ.ZmqContext 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;
        }
Пример #13
0
 /// <summary>
 /// Constructor for desired param type socket.
 /// </summary>
 /// <param name="type"></param>
 public MessagePassing(int type)
 {
     _type    = type;
     _context = ZmqContext.Create();
     _socket  = _context.CreateSocket(GetType(type));
 }