コード例 #1
0
        public IOThread(Ctx ctx, int threadId)
            : base(ctx, threadId)
        {
            m_name = "iothread-" + threadId;
            m_poller = new Poller(m_name);

            m_mailbox = new Mailbox(m_name);
            m_mailboxHandle = m_mailbox.FD;
            m_poller.AddFD (m_mailboxHandle, this);
            m_poller.SetPollin (m_mailboxHandle);
        }
コード例 #2
0
ファイル: Reaper.cs プロジェクト: JayShelton/netmq
        public Reaper(Ctx ctx, int threadId)
            : base(ctx, threadId)
        {
            m_sockets = 0;
            m_terminating = false;
            m_name = "reaper-" + threadId;
            m_poller = new Poller(m_name);

            mailbox = new Mailbox(m_name);

            m_mailboxHandle = mailbox.FD;
            m_poller.AddFD(m_mailboxHandle, this);
            m_poller.SetPollin(m_mailboxHandle);
        }
コード例 #3
0
ファイル: Reaper.cs プロジェクト: bbqchickenrobot/netmq
        public Reaper(Ctx ctx, int threadId)
            : base(ctx, threadId)
        {
            m_sockets = 0;
            m_terminating = false;

            string name = "reaper-" + threadId;
            m_poller = new Utils.Poller(name);

            m_mailbox = new Mailbox(name);

            m_mailboxHandle = m_mailbox.Handle;
            m_poller.AddHandle(m_mailboxHandle, this);
            m_poller.SetPollin(m_mailboxHandle);
        }
コード例 #4
0
ファイル: Reaper.cs プロジェクト: wxl-007/ShadowDota
        public Reaper(Ctx ctx, int threadId)
            : base(ctx, threadId)
        {
            m_sockets     = 0;
            m_terminating = false;

            string name = "reaper-" + threadId;

            m_poller = new Utils.Poller(name);

            m_mailbox = new Mailbox(name);

            m_mailboxHandle = m_mailbox.Handle;
            m_poller.AddHandle(m_mailboxHandle, this);
            m_poller.SetPollin(m_mailboxHandle);
        }
コード例 #5
0
        protected SocketBase(Ctx parent, int threadId, int sid)
            : base(parent, threadId)
        {
            m_tag           = 0xbaddecaf;
            m_ctxTerminated = false;
            m_destroyed     = false;
            m_lastTsc       = 0;
            m_ticks         = 0;
            m_rcvMore       = false;
            m_monitorSocket = null;
            m_monitorEvents = 0;

            m_options.SocketId = sid;

            m_endpoints = new Dictionary <string, Own>();
            m_pipes     = new List <Pipe>();

            m_mailbox = new Mailbox("socket-" + sid);
        }
コード例 #6
0
        public Ctx()
        {
            m_tag           = 0xabadcafe;
            m_starting      = true;
            m_terminating   = false;
            m_reaper        = null;
            m_slotCount     = 0;
            m_slots         = null;
            m_maxSockets    = ZMQ.ZmqMaxSocketsDflt;
            m_ioThreadCount = ZMQ.ZmqIOThreadsDflt;

            m_slotSync      = new object();
            m_endpointsSync = new object();
            m_optSync       = new object();

            m_termMailbox = new Mailbox("terminater");

            m_emptySlots = new Stack <int>();
            m_ioThreads  = new List <IOThread>();
            m_sockets    = new List <SocketBase>();
            m_endpoints  = new Dictionary <String, Endpoint>();
        }
コード例 #7
0
ファイル: Ctx.cs プロジェクト: xuzhe35/netmq
        public Ctx()
        {
            m_disposed      = false;
            m_starting      = true;
            m_terminating   = false;
            m_reaper        = null;
            m_slotCount     = 0;
            m_slots         = null;
            m_maxSockets    = DefaultMaxSockets;
            m_ioThreadCount = DefaultIOThreads;

            m_slotSync      = new object();
            m_endpointsSync = new object();
            m_optSync       = new object();

            m_termMailbox = new Mailbox("terminater");

            m_emptySlots = new Stack <int>();
            m_ioThreads  = new List <IOThread>();
            m_sockets    = new List <SocketBase>();
            m_endpoints  = new Dictionary <string, Endpoint>();
        }
コード例 #8
0
ファイル: SocketBase.cs プロジェクト: hecwow/netmq
        protected SocketBase(Ctx parent, int threadId, int sid)
            : base(parent, threadId)
        {
            m_tag = 0xbaddecaf;
            m_ctxTerminated = false;
            m_destroyed = false;
            m_lastTsc = 0;
            m_ticks = 0;
            m_rcvMore = false;
            m_monitorSocket = null;
            m_monitorEvents = 0;

            m_options.SocketId = sid;

            m_endpoints = new Dictionary<string, Own>();
            m_pipes = new List<Pipe>();

            m_mailbox = new Mailbox("socket-" + sid);
        }
コード例 #9
0
ファイル: SocketBase.cs プロジェクト: bbqchickenrobot/netmq
 protected SocketBase([NotNull] Ctx parent, int threadId, int socketId)
     : base(parent, threadId)
 {
     m_options.SocketId = socketId;
     m_mailbox = new Mailbox("socket-" + socketId);
 }
コード例 #10
0
ファイル: Ctx.cs プロジェクト: oskarwkarlsson/netmq
        public Ctx()
        {
            m_tag = 0xabadcafe;
            m_starting = true;
            m_terminating = false;
            m_reaper = null;
            m_slotCount = 0;
            m_slots = null;
            m_maxSockets = ZMQ.ZmqMaxSocketsDflt;
            m_ioThreadCount = ZMQ.ZmqIOThreadsDflt;

            m_slotSync = new object();
            m_endpointsSync = new object();
            m_optSync = new object();

            m_termMailbox = new Mailbox("terminater");

            m_emptySlots = new Stack<int>();
            m_ioThreads = new List<IOThread>();
            m_sockets = new List<SocketBase>();
            m_endpoints = new Dictionary<String, Endpoint>();
        }