Exemplo n.º 1
0
        /// <summary>
        ///     Create a new NetMQBeacon.
        /// </summary>
        public NetMQBeacon()
        {
            this.m_actor = NetMQActor.Create(new Shim());

            EventHandler <NetMQActorEventArgs> onReceive = (sender, e) => this.m_receiveEvent.Fire(this, new NetMQBeaconEventArgs(this));

            this.m_receiveEvent = new EventDelegator <NetMQBeaconEventArgs>(
                () => this.m_actor.ReceiveReady += onReceive,
                () => this.m_actor.ReceiveReady -= onReceive);
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Create a new NetMQActorEventArgs with the given NetMQActor.
 /// </summary>
 /// <param name="actor">the NetMQActor for this exception to reference</param>
 public NetMQActorEventArgs([NotNull] NetMQActor actor)
 {
     this.Actor = actor;
 }
Exemplo n.º 3
0
 /// <summary>
 ///     Create NetMQProactor and start dedicate thread to handle incoming messages.
 /// </summary>
 /// <param name="receiveSocket">Socket to handle messages from</param>
 /// <param name="handler">Handler to handle incoming messages</param>
 public NetMQProactor(NetMQSocket receiveSocket, Action <NetMQSocket, NetMQMessage> handler)
 {
     this.m_receiveSocket = receiveSocket;
     this.m_handler       = handler;
     this.m_actor         = NetMQActor.Create(this.Run);
 }