/// <summary>
        /// Sends a group of messages in a reliable manner
        /// </summary>
        /// <param name="msgStatus">A table that contains the data for each
        /// message to be sent in this request</param>
        /// <returns>true if the sending process is initiated,
        /// false otherwise</returns>
        public bool Send(MessageDataTable msgStatus)
        {
            bool retVal = false;

            if (!_sending && msgStatus != null)
            {
                _msgStatus    = msgStatus;
                _messagesLeft = msgStatus.Count;
                if (_messagesLeft > 0)
                {
                    IEnumerator en = _msgStatus.Values.GetEnumerator();
                    en.MoveNext();
                    MessageData msg = (MessageData)en.Current;
                    _totalTimeout        = Convert.ToInt32(msg.TotalTimeout);
                    _totalRetries        = msg.TotalRetries;
                    _totalRetriesPending = _totalRetries;
                    _partialRetries      = msg.PartialRetries;
                    UpdateWithMediaAvailability();
                    ThreadPool.QueueUserWorkItem(
                        new WaitCallback(MainSenderThreadProc));
                    retVal = true;
                }
            }
            return(retVal);
        }
 /// <summary>
 /// Sends a group of messages
 /// </summary>
 /// <param name="msgTable">The group of messages to send</param>
 public void Send(MessageDataTable msgTable)
 {
     UnregisterForReceiving();
     _msgTable                 = msgTable;
     _request                  = new Request(_channel);
     _request.OriginId         = _originId;
     _request.MessageResponse +=
         new Request.ResponseHandler(OnRequestMessageResponse);
     _request.MessageRetry += new Request.RetryHandler(OnRequestMessageRetry);
     _request.RequestDone  += new Request.RequestDoneHandler(OnRequestRequestDone);
     _request.Send(_msgTable);
 }
 public RetryGroup()
 {
     _messages = new MessageDataTable();
 }