private void Execute() { if (m_Udp == null) { return; } tReqHead pHead = GetFirstReq(); if (pHead != null) { if (pHead.uReqType == eReqType.eREQ_TYPE_SEND) { RemoteFirstReq(); UdpReqSend sndReq = pHead as UdpReqSend; if (sndReq != null) { DoSend(sndReq); sndReq.Dispose(); } } } DoRead(); }
private tReqHead GetFirstReq() { tReqHead pReq = null; lock (m_Mutex) { if (m_QueueReq.Count > 0) { LinkedListNode <tReqHead> node = m_QueueReq.First; if (node != null) { pReq = node.Value; } } } return(pReq); }