示例#1
0
文件: Pull.cs 项目: knocte/netmq
        public Pull(Ctx parent, int tid, int sid)
            : base(parent, tid, sid)
        {
            m_options.SocketType = ZmqSocketType.Pull;

            m_fq = new FQ();
        }
示例#2
0
文件: Dealer.cs 项目: knocte/netmq
        //  Holds the prefetched message.
        public Dealer(Ctx parent, int tid, int sid)
            : base(parent, tid, sid)
        {
            m_prefetched = false;
            m_options.SocketType = ZmqSocketType.Dealer;

            m_fq = new FQ();
            m_lb = new LB();
            //  TODO: Uncomment the following line when DEALER will become true DEALER
            //  rather than generic dealer socket.
            //  If the socket is closing we can drop all the outbound requests. There'll
            //  be noone to receive the replies anyway.
            //  options.delay_on_close = false;

            m_options.RecvIdentity = true;
        }
示例#3
0
文件: Router.cs 项目: knocte/netmq
        public Router(Ctx parent, int tid, int sid)
            : base(parent, tid, sid)
        {
            m_prefetched = false;
            m_identitySent = false;
            m_moreIn = false;
            m_currentOut = null;
            m_moreOut = false;
            m_nextPeerId = Utils.GenerateRandom ();
            m_mandatory = false;

            m_options.SocketType = ZmqSocketType.Router;

            m_fq = new FQ();
            m_prefetchedId = new Msg();
            m_prefetchedMsg = new Msg();

            m_anonymousPipes = new HashSet<Pipe>();
            m_outpipes = new Dictionary<Blob, Outpipe>();

            //  TODO: Uncomment the following line when ROUTER will become true ROUTER
            //  rather than generic router socket.
            //  If peer disconnect there's noone to send reply to anyway. We can drop
            //  all the outstanding requests from that peer.
            //  options.delay_on_disconnect = false;

            m_options.RecvIdentity = true;
        }
示例#4
0
文件: XSub.cs 项目: knocte/netmq
        public XSub(Ctx parent, int tid, int sid)
            : base(parent, tid, sid)
        {
            m_options.SocketType = ZmqSocketType.Xsub;
            m_hasMessage = false;
            m_more = false;

            m_options.Linger = 0;
            m_fq = new FQ();
            m_dist = new Dist();
            m_subscriptions = new Trie();
        }