Esempio n. 1
0
 public ItemOutQueue(Route route, Packet packet, OutQueue outQueue)
 {
     this.route      = route;
     this.dest       = route.remoteNodeAddress;
     this.packet     = packet;
     this.packetSent = new ManualResetEvent(false);
     this.outQueue   = outQueue;
 }
Esempio n. 2
0
        public MailboxOut(Node localNode)
        {
            this.localNode = localNode;

            STPStartInfo s_info = new STPStartInfo();

            s_info.MinWorkerThreads = 1;
            s_info.MaxWorkerThreads = MAX_THREADS;
            m_STP = new SmartThreadPool(s_info);

            wgKeepAlive  = m_STP.CreateWorkItemsGroup(50);
            wgSendFrames = m_STP.CreateWorkItemsGroup(50);

            sending  = true;
            outQueue = new OutQueue(localNode);
            threadProcSendPackets      = new Thread(new ThreadStart(ProcSendPacket));
            threadProcSendPackets.Name = string.Format("SenderPackets {0}", threadProcSendPackets.GetHashCode());
            threadProcSendPackets.Start();
        }