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

            this.frontendAddress = frontendAddress;
            this.backendAddress = backendAddress;
        }
Beispiel #3
0
        public ZmqPollBroker(ZeroMQ.ZmqContext zmqContext,
                             string frontendAddress,
                             string backendAddress)
        {
            this.zmqContext = zmqContext;

            this.frontendAddress = frontendAddress;
            this.backendAddress  = backendAddress;
        }
Beispiel #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;
        }
        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);
        }
        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);
        }
        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;
        }
Beispiel #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;
        }
        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;
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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;
        }
Beispiel #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));
 }