Ejemplo n.º 1
0
        // Queue the outgoing message so it it sent "now" and before update messages.
        public void ImmediateOutgoingMsg(SyncMsg msg)
        {
            msg.LogTransmission(this);

            // The new way is to add a first queue and to place this message at the front.
            m_outQ.QueueMessageFirst(msg);

            if (m_collectingStats)
            {
                currentQueue.Event(1);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Enqueue update of an object/avatar into the outgoing queue, and return right away
        /// </summary>
        /// <param name="id">UUID of the object/avatar</param>
        /// <param name="update">the update infomation in byte format</param>
        public void EnqueueOutgoingUpdate(UUID id, SyncMsg update)
        {
            // m_log.DebugFormat("{0} Enqueue msg {1}", LogHeader, update.ToString());
            update.LogTransmission(this);
            // Enqueue is thread safe
            bool actuallyQueued = m_outQ.Enqueue(id, update);

            /* BEGIN DEBUG
             * if (!actuallyQueued)
             * {
             *  SyncMsgUpdatedProperties upd = update as SyncMsgUpdatedProperties;
             *  m_log.DebugFormat("{0} EnqueueOutgoingUpdate. Multiple update. UUID={1}, prop={2}",
             *                      LogHeader, upd.Uuid, upd.PropsAsString());
             * }
             * END DEBUG */
            if (actuallyQueued && m_collectingStats)
            {
                currentQueue.Event(1);
            }
        }