Ejemplo n.º 1
0
        public byte[] FindTelehub(Dictionary <string, object> request)
        {
            UUID regionID = UUID.Zero;

            UUID.TryParse(request["REGIONID"].ToString(), out regionID);

            Dictionary <string, object> result = new Dictionary <string, object>();
            Telehub telehub = TelehubConnector.FindTelehub(regionID, 0);

            if (telehub != null)
            {
                result = telehub.ToKeyValuePairs();
            }
            string xmlString = WebUtils.BuildXmlResponse(result);
            //m_log.DebugFormat("[AuroraDataServerPostHandler]: resp string: {0}", xmlString);
            UTF8Encoding encoding = new UTF8Encoding();

            return(encoding.GetBytes(xmlString));
        }
Ejemplo n.º 2
0
        public void AddTelehub(Telehub telehub, ulong RegionHandle)
        {
            Dictionary <string, object> sendData = telehub.ToKeyValuePairs();

            sendData["METHOD"] = "addtelehub";

            string reqString = WebUtils.BuildQueryString(sendData);

            try
            {
                List <string> m_ServerURIs = m_registry.RequestModuleInterface <IConfigurationService>().FindValueOf(RegionHandle.ToString(), "GridServerURI");
                foreach (string m_ServerURI in m_ServerURIs)
                {
                    SynchronousRestFormsRequester.MakeRequest("POST",
                                                              m_ServerURI,
                                                              reqString);
                }
            }
            catch (Exception e)
            {
                m_log.DebugFormat("[AuroraRemoteRegionConnector]: Exception when contacting server: {0}", e.ToString());
            }
        }