当前位置: 首页>>代码示例>>C#>>正文


C# IHttpServer.AddXmlRPCHandler方法代码示例

本文整理汇总了C#中IHttpServer.AddXmlRPCHandler方法的典型用法代码示例。如果您正苦于以下问题:C# IHttpServer.AddXmlRPCHandler方法的具体用法?C# IHttpServer.AddXmlRPCHandler怎么用?C# IHttpServer.AddXmlRPCHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IHttpServer的用法示例。


在下文中一共展示了IHttpServer.AddXmlRPCHandler方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HypergridServiceInConnector

 public HypergridServiceInConnector(IConfigSource config, IHttpServer server, IHyperlinkService hyperService) :
         base(config, server, String.Empty)
 {
     m_HyperlinkService = hyperService;
     server.AddXmlRPCHandler("link_region", LinkRegionRequest, false);
     server.AddXmlRPCHandler("expect_hg_user", ExpectHGUser, false);
 }
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:7,代码来源:HypergridServerConnector.cs

示例2: GridInfoServerInConnector

        public GridInfoServerInConnector(IConfigSource config, IHttpServer server, string configName) :
            base(config, server, configName)
        {
            GridInfoHandlers handlers = new GridInfoHandlers(config);

            server.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info",
                                                               handlers.RestGetGridInfoMethod));
            server.AddXmlRPCHandler("get_grid_info", handlers.XmlRpcGridInfoMethod);
        }
开发者ID:openmetaversefoundation,项目名称:fortis-opensim,代码行数:9,代码来源:GridInfoServerInConnector.cs

示例3: GatekeeperServiceInConnector

        public GatekeeperServiceInConnector(IConfigSource config, IHttpServer server, ISimulationService simService) :
                base(config, server, String.Empty)
        {
            IConfig gridConfig = config.Configs["GatekeeperService"];
            if (gridConfig != null)
            {
                string serviceDll = gridConfig.GetString("LocalServiceModule", string.Empty);
                Object[] args = new Object[] { config, simService };
                m_GatekeeperService = ServerUtils.LoadPlugin<IGatekeeperService>(serviceDll, args);

            }
            if (m_GatekeeperService == null)
                throw new Exception("Gatekeeper server connector cannot proceed because of missing service");

            HypergridHandlers hghandlers = new HypergridHandlers(m_GatekeeperService);
            server.AddXmlRPCHandler("link_region", hghandlers.LinkRegionRequest, false);
            server.AddXmlRPCHandler("get_region", hghandlers.GetRegion, false);

            server.AddHTTPHandler("/foreignagent/", new GatekeeperAgentHandler(m_GatekeeperService).Handler);
        }
开发者ID:AlexRa,项目名称:opensim-mods-Alex,代码行数:20,代码来源:GatekeeperServerConnector.cs

示例4: UserAgentServerConnector

        public UserAgentServerConnector(IConfigSource config, IHttpServer server) :
                base(config, server, String.Empty)
        {
            IConfig gridConfig = config.Configs["UserAgentService"];
            if (gridConfig != null)
            {
                string serviceDll = gridConfig.GetString("LocalServiceModule", string.Empty);
                Object[] args = new Object[] { config };
                m_HomeUsersService = ServerUtils.LoadPlugin<IUserAgentService>(serviceDll, args);
            }
            if (m_HomeUsersService == null)
                throw new Exception("UserAgent server connector cannot proceed because of missing service");

            server.AddXmlRPCHandler("agent_is_coming_home", AgentIsComingHome, false);
            server.AddXmlRPCHandler("get_home_region", GetHomeRegion, false);
            server.AddXmlRPCHandler("verify_agent", VerifyAgent, false);
            server.AddXmlRPCHandler("verify_client", VerifyClient, false);
            server.AddXmlRPCHandler("logout_agent", LogoutAgent, false);

            server.AddHTTPHandler("/homeagent/", new HomeAgentHandler(m_HomeUsersService).Handler);
        }
开发者ID:AlexRa,项目名称:opensim-mods-Alex,代码行数:21,代码来源:UserAgentServerConnector.cs

示例5: HGAuthServiceInConnector

        public HGAuthServiceInConnector(IConfigSource config, IHttpServer server, IScene registry) :
                base(config, server)
        {
            IConfig serverConfig = config.Configs["AuthenticationService"];
            if (serverConfig == null)
                throw new Exception("No section 'AuthenticationService' in config file");

            string authenticationService = serverConfig.GetString("LocalServiceModule",
                    String.Empty);

            if (authenticationService == String.Empty)
                throw new Exception("No AuthenticationService in config file");

            Object[] args = new Object[] { config };
            m_AuthenticationService = ServerUtils.LoadPlugin<IAuthenticationService>(authenticationService, args);
            registry.RegisterModuleInterface<IAuthenticationService>(m_AuthenticationService);

            HGAuthenticationHandlers m_handlers = new HGAuthenticationHandlers(m_AuthenticationService);
            server.AddXmlRPCHandler("hg_new_auth_key", m_handlers.GenerateKeyMethod);
            server.AddXmlRPCHandler("hg_verify_auth_key", m_handlers.VerifyKeyMethod);
        }
开发者ID:ChrisD,项目名称:opensim,代码行数:21,代码来源:HGAuthServerConnector.cs

示例6: InstantMessageServerConnector

        public InstantMessageServerConnector(IConfigSource config, IHttpServer server, IInstantMessageSimConnector simConnector) :
                base(config, server, String.Empty)
        {
            IConfig gridConfig = config.Configs["HGInstantMessageService"];
            if (gridConfig != null)
            {
                string serviceDll = gridConfig.GetString("LocalServiceModule", string.Empty);

                Object[] args = new Object[] { config, simConnector };
                m_IMService = ServerUtils.LoadPlugin<IInstantMessage>(serviceDll, args);
            }
            if (m_IMService == null)
                throw new Exception("InstantMessage server connector cannot proceed because of missing service");

            server.AddXmlRPCHandler("grid_instant_message", ProcessInstantMessage, false);

        }
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:17,代码来源:InstantMessageServerConnector.cs

示例7: LandServiceInConnector

        // TODO : private IAuthenticationService m_AuthenticationService;

        public LandServiceInConnector(IConfigSource source, IHttpServer server, ILandService service, IScene scene) :
                base(source, server, String.Empty)
        {
            m_LandService = service;
            if (m_LandService == null)
            {
                m_log.Error("[LAND IN CONNECTOR]: Land service was not provided");
                return;
            }
            
            //bool authentication = neighbourConfig.GetBoolean("RequireAuthentication", false);
            //if (authentication)
            //    m_AuthenticationService = scene.RequestModuleInterface<IAuthenticationService>();

            LandHandlers landHandlers = new LandHandlers(m_LandService);
            server.AddXmlRPCHandler("land_data", landHandlers.GetLandData, false);
        }
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:19,代码来源:LandServiceInConnector.cs

示例8: UserAgentServerConnector

        public UserAgentServerConnector(IConfigSource config, IHttpServer server, IFriendsSimConnector friendsConnector) :
                base(config, server, String.Empty)
        {
            IConfig gridConfig = config.Configs["UserAgentService"];
            if (gridConfig != null)
            {
                string serviceDll = gridConfig.GetString("LocalServiceModule", string.Empty);

                Object[] args = new Object[] { config, friendsConnector };
                m_HomeUsersService = ServerUtils.LoadPlugin<IUserAgentService>(serviceDll, args);
            }
            if (m_HomeUsersService == null)
                throw new Exception("UserAgent server connector cannot proceed because of missing service");

            string loginServerIP = gridConfig.GetString("LoginServerIP", "127.0.0.1");
            bool proxy = gridConfig.GetBoolean("HasProxy", false);

            m_VerifyCallers = gridConfig.GetBoolean("VerifyCallers", false);
            string csv = gridConfig.GetString("AuthorizedCallers", "127.0.0.1");
            csv = csv.Replace(" ", "");
            m_AuthorizedCallers = csv.Split(',');

            server.AddXmlRPCHandler("agent_is_coming_home", AgentIsComingHome, false);
            server.AddXmlRPCHandler("get_home_region", GetHomeRegion, false);
            server.AddXmlRPCHandler("verify_agent", VerifyAgent, false);
            server.AddXmlRPCHandler("verify_client", VerifyClient, false);
            server.AddXmlRPCHandler("logout_agent", LogoutAgent, false);

            server.AddXmlRPCHandler("status_notification", StatusNotification, false);
            server.AddXmlRPCHandler("get_online_friends", GetOnlineFriends, false);
            server.AddXmlRPCHandler("get_user_info", GetUserInfo, false);
            server.AddXmlRPCHandler("get_server_urls", GetServerURLs, false);

            server.AddXmlRPCHandler("locate_user", LocateUser, false);
            server.AddXmlRPCHandler("get_uui", GetUUI, false);

            server.AddHTTPHandler("/homeagent/", new HomeAgentHandler(m_HomeUsersService, loginServerIP, proxy).Handler);
        }
开发者ID:4U2NV,项目名称:opensim,代码行数:38,代码来源:UserAgentServerConnector.cs

示例9: Initialise

        public void Initialise(OpenSimBase openSim)
        {
            m_configSource = openSim.ConfigSource.Source;
            try
            {
                if (m_configSource.Configs["RemoteAdmin"] == null ||
                    !m_configSource.Configs["RemoteAdmin"].GetBoolean("enabled", false))
                {
                    // No config or disabled
                }
                else
                {
                    m_config = m_configSource.Configs["RemoteAdmin"];
                    m_log.Debug("[RADMIN]: Remote Admin Plugin Enabled");
                    m_requiredPassword = m_config.GetString("access_password", String.Empty);
                    int port = m_config.GetInt("port", 0);

                    m_application = openSim;
                    string bind_ip_address = m_config.GetString("bind_ip_address", "0.0.0.0");
                    IPAddress ipaddr = IPAddress.Parse(bind_ip_address);
                    m_httpServer = MainServer.GetHttpServer((uint)port,ipaddr);

                    Dictionary<string, XmlRpcMethod> availableMethods = new Dictionary<string, XmlRpcMethod>();
                    availableMethods["admin_create_region"] = XmlRpcCreateRegionMethod;
                    availableMethods["admin_delete_region"] = XmlRpcDeleteRegionMethod;
                    availableMethods["admin_close_region"] = XmlRpcCloseRegionMethod;
                    availableMethods["admin_modify_region"] = XmlRpcModifyRegionMethod;
                    availableMethods["admin_region_query"] = XmlRpcRegionQueryMethod;
                    availableMethods["admin_shutdown"] = XmlRpcShutdownMethod;
                    availableMethods["admin_broadcast"] = XmlRpcAlertMethod;
                    availableMethods["admin_restart"] = XmlRpcRestartMethod;
                    availableMethods["admin_load_heightmap"] = XmlRpcLoadHeightmapMethod;
                    availableMethods["admin_save_heightmap"] = XmlRpcSaveHeightmapMethod;
                    // User management
                    availableMethods["admin_create_user"] = XmlRpcCreateUserMethod;
                    availableMethods["admin_create_user_email"] = XmlRpcCreateUserMethod;
                    availableMethods["admin_exists_user"] = XmlRpcUserExistsMethod;
                    availableMethods["admin_update_user"] = XmlRpcUpdateUserAccountMethod;
                    // Region state management
                    availableMethods["admin_load_xml"] = XmlRpcLoadXMLMethod;
                    availableMethods["admin_save_xml"] = XmlRpcSaveXMLMethod;
                    availableMethods["admin_load_oar"] = XmlRpcLoadOARMethod;
                    availableMethods["admin_save_oar"] = XmlRpcSaveOARMethod;
                    // Estate access list management
                    availableMethods["admin_acl_clear"] = XmlRpcAccessListClear;
                    availableMethods["admin_acl_add"] = XmlRpcAccessListAdd;
                    availableMethods["admin_acl_remove"] = XmlRpcAccessListRemove;
                    availableMethods["admin_acl_list"] = XmlRpcAccessListList;

                    // Either enable full remote functionality or just selected features
                    string enabledMethods = m_config.GetString("enabled_methods", "all");

                    // To get this, you must explicitly specify "all" or
                    // mention it in a whitelist. It won't be available
                    // If you just leave the option out!
                    //
                    if (!String.IsNullOrEmpty(enabledMethods))
                        availableMethods["admin_console_command"] = XmlRpcConsoleCommandMethod;

                    // The assumption here is that simply enabling Remote Admin as before will produce the same
                    // behavior - enable all methods unless the whitelist is in place for backward-compatibility.
                    if (enabledMethods.ToLower() == "all" || String.IsNullOrEmpty(enabledMethods))
                    {
                        foreach (string method in availableMethods.Keys)
                        {
                            m_httpServer.AddXmlRPCHandler(method, availableMethods[method], false);
                        }
                    }
                    else
                    {
                        foreach (string enabledMethod in enabledMethods.Split('|'))
                        {
                            m_httpServer.AddXmlRPCHandler(enabledMethod, availableMethods[enabledMethod]);
                        }
                    }
                }
            }
            catch (NullReferenceException)
            {
                // Ignore.
            }
        }
开发者ID:NovaGrid,项目名称:opensim,代码行数:82,代码来源:RemoteAdminPlugin.cs

示例10: InitializeHandlers

 private void InitializeHandlers(IHttpServer server)
 {
     server.AddXmlRPCHandler("login_to_simulator", HandleXMLRPCLogin);
     server.AddXmlRPCHandler("/", HandleXMLRPCLogin);
     server.AddXmlRPCHandler("set_login_level", HandleXMLRPCSetLoginLevel);
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:6,代码来源:LLLoginServiceInConnector.cs

示例11: InitializeHandlers

 private void InitializeHandlers(IHttpServer server)
 {
     LLLoginHandlers loginHandlers = new LLLoginHandlers(m_LoginService, m_Config, m_Proxy);
     server.AddXmlRPCHandler("login_to_simulator", loginHandlers.HandleXMLRPCLogin, false);
     server.AddXmlRPCHandler("set_login_level", loginHandlers.HandleXMLRPCSetLoginLevel, false);
     server.SetDefaultLLSDHandler(loginHandlers.HandleLLSDLogin);
 }
开发者ID:mugginsm,项目名称:Aurora-Sim,代码行数:7,代码来源:LLLoginServiceInConnector.cs

示例12: FinishedStartup

        public void FinishedStartup ()
        {
            var simBase = m_registry.RequestModuleInterface<ISimulationBase> ();
            if (simBase.IsGridServer)
                return;

            //start XMLRPC server only for regions
            if (IsEnabled () && !ServerStarted ()) {
                m_httpServerStarted = true;
                // Start http server
                // Attach xmlrpc handlers
                MainConsole.Instance.Info ("[XMLRPC]: " +
                    "Starting up XMLRPC Server on port " + m_remoteDataPort +
                    " for llRemoteData commands.");
                //IHttpServer httpServer = new BaseHttpServer ((uint)m_remoteDataPort, MainServer.Instance.HostName,
                //    false, 1);
                //httpServer.AddXmlRPCHandler ("llRemoteData", XmlRpcRemoteData);
                //httpServer.Start ();

                m_server = simBase.GetHttpServer ((uint)m_remoteDataPort);
                m_server.AddXmlRPCHandler ("llRemoteData", XmlRpcRemoteData);

            }
        }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:24,代码来源:XMLRPCModule.cs

示例13: InitializeHandlers

 private void InitializeHandlers(IHttpServer server)
 {
     RexLoginHandlers loginHandlers = new RexLoginHandlers(m_LLLoginService, m_RexLoginService);
     server.AddXmlRPCHandler("login_to_simulator", loginHandlers.HandleXMLRPCLogin, false);
 }
开发者ID:jonnenauha,项目名称:ModreX,代码行数:5,代码来源:RexLoginServiceInConnector.cs

示例14: InitializeHandlers

 private void InitializeHandlers(IHttpServer server)
 {
     LLLoginHandlers loginHandlers = new LLLoginHandlers(m_LoginService);
     server.AddXmlRPCHandler("login_to_simulator", loginHandlers.HandleXMLRPCLogin, false);
     server.SetDefaultLLSDHandler(loginHandlers.HandleLLSDLogin);
 }
开发者ID:dreamerc,项目名称:diva-distribution,代码行数:6,代码来源:LLLoginServiceInConnector.cs

示例15: InitializeHandlers

 private void InitializeHandlers(IHttpServer server)
 {
     LLLoginHandlers loginHandlers = new LLLoginHandlers(m_LoginService, m_Proxy);
     server.AddXmlRPCHandler("login_to_simulator", 
         new XmlRpcBasicDOSProtector(loginHandlers.HandleXMLRPCLogin,loginHandlers.HandleXMLRPCLoginBlocked,
             m_DosProtectionOptions).Process, false);
     server.AddXmlRPCHandler("set_login_level", loginHandlers.HandleXMLRPCSetLoginLevel, false);
     server.SetDefaultLLSDHandler(loginHandlers.HandleLLSDLogin);
     server.AddWebSocketHandler("/WebSocket/GridLogin", loginHandlers.HandleWebSocketLoginEvents);
 }
开发者ID:CassieEllen,项目名称:opensim,代码行数:10,代码来源:LLLoginServiceInConnector.cs


注:本文中的IHttpServer.AddXmlRPCHandler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。