Пример #1
0
        /// <summary>
        /// Create new instance of ZMQSubscriber, and connect to the given port.
        /// </summary>
        public ZMQSubscriber(IPubSubEventSerializer serializer)
        {
            this.Serializer = serializer;

            this.Socket = InitSocket();

            // Setup non-blocking polling for subscriber socket.
            this.Poller = new NetMQPoller();
            this.Poller.Add(this.Socket);
            this.Socket.ReceiveReady += OnReceiveReady;
            this.Poller.RunAsync();
        }
Пример #2
0
 /// <summary>
 /// Create new instance of ZMQPublisher, and bind to the given port.
 /// </summary>
 public ZMQPublisher(IPubSubEventSerializer serializer)
 {
     this.Serializer = serializer;
     this.Socket     = InitSocket();
 }