Exemple #1
0
        protected virtual void RegisterHttpHandlers()
        {
            m_loginService.RegisterHandlers(m_httpServer, true);

            m_userManager.RegisterHandlers(m_httpServer);
            m_friendsModule.RegisterHandlers(m_httpServer);
            m_avatarAppearanceModule.RegisterHandlers(m_httpServer);
            m_messagesService.RegisterHandlers(m_httpServer);
            m_gridInfoService.RegisterHandlers(m_httpServer);

            m_radmin = new InWorldz.RemoteAdmin.RemoteAdmin();
            m_radmin.AddCommand("UserService", "Shutdown", UserServerShutdownHandler);
            m_radmin.AddHandler(m_httpServer);
        }
Exemple #2
0
        protected override void StartupSpecific()
        {
            m_config = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml")));

            m_log.Info("[GRID]: Starting HTTP process");
            m_httpServer = new BaseHttpServer(m_config.HttpPort, null);

            LoadPlugins();

            m_httpServer.Start();

            m_radmin = new InWorldz.RemoteAdmin.RemoteAdmin();
            m_radmin.AddCommand("GridService", "Shutdown", GridServerShutdownHandler);
            m_radmin.AddHandler(m_httpServer);

            base.StartupSpecific();
        }
Exemple #3
0
        private void registerWithUserServer()
        {
retry:

            if (m_userServerModule.registerWithUserServer())
            {
                m_log.Info("[SERVER]: Starting HTTP process");
                m_httpServer = new BaseHttpServer(Cfg.HttpPort, null);

                m_httpServer.AddXmlRPCHandler("login_to_simulator", msgsvc.UserLoggedOn);
                m_httpServer.AddXmlRPCHandler("logout_of_simulator", msgsvc.UserLoggedOff);
                m_httpServer.AddXmlRPCHandler("get_presence_info_bulk", msgsvc.GetPresenceInfoBulk);
                m_httpServer.AddXmlRPCHandler("process_region_shutdown", msgsvc.ProcessRegionShutdown);
                m_httpServer.AddXmlRPCHandler("agent_location", msgsvc.AgentLocation);
                m_httpServer.AddXmlRPCHandler("agent_leaving", msgsvc.AgentLeaving);
                m_httpServer.AddXmlRPCHandler("region_startup", m_regionModule.RegionStartup);
                m_httpServer.AddXmlRPCHandler("region_shutdown", m_regionModule.RegionShutdown);

                // New Style
                m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("login_to_simulator"), msgsvc.UserLoggedOn));
                m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("logout_of_simulator"), msgsvc.UserLoggedOff));
                m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_presence_info_bulk"), msgsvc.GetPresenceInfoBulk));
                m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("process_region_shutdown"), msgsvc.ProcessRegionShutdown));
                m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("agent_location"), msgsvc.AgentLocation));
                m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("agent_leaving"), msgsvc.AgentLeaving));
                m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("region_startup"), m_regionModule.RegionStartup));
                m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("region_shutdown"), m_regionModule.RegionShutdown));

                m_radmin = new InWorldz.RemoteAdmin.RemoteAdmin(Cfg.SSLPublicCertFile);
                m_radmin.AddCommand("MessagingService", "Shutdown", MessagingServerShutdownHandler);
                m_radmin.AddHandler(m_httpServer);

                m_httpServer.Start();

                m_log.Info("[SERVER]: Userserver registration was successful");
            }
            else
            {
                m_log.Error("[STARTUP]: Unable to connect to User Server, retrying in 5 seconds");
                System.Threading.Thread.Sleep(5000);
                goto retry;
            }
        }