Example #1
0
        static XPub()
        {
            s_markAsMatching = (pipe, data, arg) =>
            {
                XPub self = (XPub)arg;
                self.m_dist.Match(pipe);
            };

            s_SendUnsubscription = (pipe, data, arg) =>
            {

                XPub self = (XPub)arg;

                if (self.m_options.SocketType != ZmqSocketType.Pub)
                {

                    //  Place the unsubscription to the queue of pending (un)sunscriptions
                    //  to be retrived by the user later on.
                    Blob unsub = new Blob(data.Length + 1);
                    unsub.Put(0, (byte)0);
                    unsub.Put(1, data);
                    self.m_pending.Enqueue(unsub);

                }
            };
        }
Example #2
0
            static PublisherShimHandler()
            {
                MarkAsMatching = (pipe, data, arg) =>
                {
                    PublisherShimHandler self = (PublisherShimHandler)arg;

                    self._identities.Swap(IndexOf(self._identities, pipe), self._matching);
                    self._matching++;
                };

                SendUnsubscription = (pipe, data, arg) => { };

                ByteArrayEqualityComparer = new ByteArrayEqualityComparer();
            }
Example #3
0
            static PublisherShimHandler()
            {
                s_markAsMatching = (pipe, data, arg) =>
                {
                    PublisherShimHandler self = (PublisherShimHandler)arg;

                    Utils.Swap(self.m_identities, IndexOf(self.m_identities, pipe), self.m_matching);
                    self.m_matching++;
                };

                s_SendUnsubscription = (pipe, data, arg) =>
                {
                };

                s_byteArrayEqualityComparer = new ByteArrayEqualityComparer();
            }
Example #4
0
        static XPub()
        {
            s_markAsMatching = (pipe, data, arg) =>
            {
                XPub self = (XPub)arg;
                self.m_dist.Match(pipe);
            };

            s_SendUnsubscription = (pipe, data, arg) =>
            {
                XPub self = (XPub)arg;

                if (self.m_options.SocketType != ZmqSocketType.Pub)
                {
                    //  Place the unsubscription to the queue of pending (un)sunscriptions
                    //  to be retrived by the user later on.
                    Blob unsub = new Blob(data.Length + 1);
                    unsub.Put(0, (byte)0);
                    unsub.Put(1, data);
                    self.m_pending.Enqueue(unsub);
                }
            };
        }