コード例 #1
0
ファイル: Pull.cs プロジェクト: GianniBortoloBossini/netmq
        public Pull(Ctx parent, int threadId, int sid)
            : base(parent, threadId, sid)
        {
            m_options.SocketType = ZmqSocketType.Pull;

            m_fq = new FQ();
        }
コード例 #2
0
ファイル: Router.cs プロジェクト: wbj808178/netmq
        public Router(Ctx parent, int threadId, int sid)
            : base(parent, threadId, sid)
        {
            m_prefetched   = false;
            m_identitySent = false;
            m_moreIn       = false;
            m_currentOut   = null;
            m_moreOut      = false;
            m_nextPeerId   = Utils.GenerateRandom();
            m_mandatory    = false;
            m_rawSocket    = 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;
        }
コード例 #3
0
ファイル: Pull.cs プロジェクト: wbj808178/netmq
        public Pull(Ctx parent, int threadId, int sid)
            : base(parent, threadId, sid)
        {
            m_options.SocketType = ZmqSocketType.Pull;

            m_fq = new FQ();
        }
コード例 #4
0
        public XSub(Ctx parent, int threadId, int sid) : base(parent, threadId, 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();
        }
コード例 #5
0
ファイル: Dealer.cs プロジェクト: oskarwkarlsson/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;
        }
コード例 #6
0
ファイル: Dealer.cs プロジェクト: wbj808178/netmq
        //  Holds the prefetched message.
        public Dealer(Ctx parent, int threadId, int sid)
            : base(parent, threadId, 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;
        }
コード例 #7
0
ファイル: Stream.cs プロジェクト: hecwow/netmq
        public Stream(Ctx parent, int threadId, int sid)
            : base(parent, threadId, sid)
        {
            m_prefetched = false;
              m_identitySent = false;
              m_currentOut = null;
              m_moreOut = false;
              m_nextPeerId = Utils.GenerateRandom();

              m_options.SocketType = ZmqSocketType.Stream;

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

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

              m_options.RawSocket = true;
        }
コード例 #8
0
ファイル: Stream.cs プロジェクト: wbj808178/netmq
        public Stream(Ctx parent, int threadId, int sid)
            : base(parent, threadId, sid)
        {
            m_prefetched   = false;
            m_identitySent = false;
            m_currentOut   = null;
            m_moreOut      = false;
            m_nextPeerId   = Utils.GenerateRandom();

            m_options.SocketType = ZmqSocketType.Stream;


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

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

            m_options.RawSocket = true;
        }
コード例 #9
0
ファイル: XSub.cs プロジェクト: jasenkin/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();
        }
コード例 #10
0
ファイル: Router.cs プロジェクト: JayShelton/netmq
        public Router(Ctx parent, int threadId, int sid)
            : base(parent, threadId, sid)
        {
            m_prefetched = false;
            m_identitySent = false;
            m_moreIn = false;
            m_currentOut = null;
            m_moreOut = false;
            m_nextPeerId = Utils.GenerateRandom();
            m_mandatory = false;
            m_rawSocket = 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;
        }