Exemple #1
0
 //legacy
 public bool Enqueue(OSD data, UUID avatarID)
 {
     //m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName);
     try
     {
         Queue <byte[]> queue = GetQueue(avatarID);
         if (queue != null)
         {
             byte[] evData = Util.UTF8NBGetbytes(OSDParser.SerializeLLSDInnerXmlString(data));
             lock (queue)
                 queue.Enqueue(evData);
         }
         else
         {
             m_log.WarnFormat(
                 "[EVENTQUEUE]: (Enqueue) No queue found for agent {0} in region {1}",
                 avatarID, m_scene.Name);
         }
     }
     catch (NullReferenceException e)
     {
         m_log.Error("[EVENTQUEUE] Caught exception: " + e);
         return(false);
     }
     return(true);
 }
Exemple #2
0
        public byte[] BuildEvent(string eventName, OSD eventBody)
        {
            OSDMap llsdEvent = new OSDMap(2);

            llsdEvent.Add("message", new OSDString(eventName));
            llsdEvent.Add("body", eventBody);

            return(Util.UTF8NBGetbytes(OSDParser.SerializeLLSDInnerXmlString(llsdEvent)));
        }