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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
        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);
        }
Exemple #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>();
        }
Exemple #7
0
        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>();
        }
Exemple #8
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);
        }
Exemple #9
0
 protected SocketBase([NotNull] Ctx parent, int threadId, int socketId)
     : base(parent, threadId)
 {
     m_options.SocketId = socketId;
     m_mailbox = new Mailbox("socket-" + socketId);
 }
Exemple #10
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>();
        }