Esempio n. 1
0
        internal void InvokeEvents(object sender, PollEvents events)
        {
            if (!m_isClosed)
            {
                m_socketEventArgs.Init(events);

                if (events.HasFlag(PollEvents.PollIn))
                {
                    var temp = m_receiveReady;
                    if (temp != null)
                    {
                        temp(sender, m_socketEventArgs);
                    }
                }

                if (events.HasFlag(PollEvents.PollOut))
                {
                    var temp = m_sendReady;
                    if (temp != null)
                    {
                        temp(sender, m_socketEventArgs);
                    }
                }
            }
        }
        internal SocketEventArgs(ZmqSocket socket, PollEvents readyEvents)
        {
            if (socket == null)
            {
                throw new ArgumentNullException("socket");
            }

            this.Socket = socket;
            this.ReceiveReady = readyEvents.HasFlag(PollEvents.PollIn);
            this.SendReady = readyEvents.HasFlag(PollEvents.PollOut);
        }
Esempio n. 3
0
        internal SocketEventArgs(ZmqSocket socket, PollEvents readyEvents)
        {
            if (socket == null)
            {
                throw new ArgumentNullException("socket");
            }

            Socket       = socket;
            ReceiveReady = readyEvents.HasFlag(PollEvents.PollIn);
            SendReady    = readyEvents.HasFlag(PollEvents.PollOut);
        }
Esempio n. 4
0
        internal void InvokePollEvents(PollEvents readyEvents)
        {
            if (readyEvents.HasFlag(PollEvents.PollIn))
            {
                InvokeReceiveReady(readyEvents);
            }

            if (readyEvents.HasFlag(PollEvents.PollOut))
            {
                InvokeSendReady(readyEvents);
            }
        }
Esempio n. 5
0
 internal void Init(PollEvents events)
 {
     this.ReceiveReady = events.HasFlag(PollEvents.PollIn);
     this.SendReady = events.HasFlag(PollEvents.PollOut);
 }
Esempio n. 6
0
 /// <summary>
 /// Initialize the ReceiveReady and SendReady flags from the given PollEvents value.
 /// </summary>
 /// <param name="events">a PollEvents value that indicates whether the socket is ready to send or receive without blocking</param>
 internal void Init(PollEvents events)
 {
     ReceiveReady = events.HasFlag(PollEvents.PollIn);
     SendReady    = events.HasFlag(PollEvents.PollOut);
 }
 /// <summary>
 /// Initialise the ReceiveReady and SendReady flags from the given PollEvents value.
 /// </summary>
 /// <param name="events">a PollEvents value that indicates whether the socket is ready to send or receive without blocking</param>
 internal void Init(PollEvents events)
 {
     IsReadyToReceive = events.HasFlag(PollEvents.PollIn);
     IsReadyToSend = events.HasFlag(PollEvents.PollOut);
 }