Ejemplo n.º 1
0
        public void AddTelehub(Telehub telehub, ulong RegionHandle)
        {
            Dictionary <string, object> sendData = telehub.ToKVP();

            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)
            {
                MainConsole.Instance.DebugFormat("[AuroraRemoteRegionConnector]: Exception when contacting server: {0}", e);
            }
        }
Ejemplo n.º 2
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.ToKVP();
            }
            string xmlString = WebUtils.BuildXmlResponse(result);
            //MainConsole.Instance.DebugFormat("[AuroraDataServerPostHandler]: resp string: {0}", xmlString);
            UTF8Encoding encoding = new UTF8Encoding();

            return(encoding.GetBytes(xmlString));
        }