本文整理汇总了C#中OpenSim.Framework.Servers.HttpServer.BaseHttpServer.AddStreamHandler方法的典型用法代码示例。如果您正苦于以下问题:C# BaseHttpServer.AddStreamHandler方法的具体用法?C# BaseHttpServer.AddStreamHandler怎么用?C# BaseHttpServer.AddStreamHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Framework.Servers.HttpServer.BaseHttpServer
的用法示例。
在下文中一共展示了BaseHttpServer.AddStreamHandler方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterHandlers
public void RegisterHandlers(BaseHttpServer httpServer)
{
m_httpServer = httpServer;
// Rest
m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod));
// XmlRpc
m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod);
// New Style
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_grid_info"), m_gridInfoService.XmlRpcGridInfoMethod));
}
示例2: RegisterHandlers
public void RegisterHandlers(BaseHttpServer httpServer)
{
m_httpServer = httpServer;
m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info",
m_gridInfoService.RestGetGridInfoMethod));
m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod);
}
示例3: RegisterHandlers
public void RegisterHandlers(BaseHttpServer httpServer)
{
m_httpServer = httpServer;
m_httpServer.AddXmlRPCHandler("add_new_user_friend", XmlRpcResponseXmlRPCAddUserFriend);
m_httpServer.AddXmlRPCHandler("remove_user_friend", XmlRpcResponseXmlRPCRemoveUserFriend);
m_httpServer.AddXmlRPCHandler("update_user_friend_perms", XmlRpcResponseXmlRPCUpdateUserFriendPerms);
m_httpServer.AddXmlRPCHandler("get_user_friend_list", XmlRpcResponseXmlRPCGetUserFriendList);
// New Style
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("add_new_user_friend"), XmlRpcResponseXmlRPCAddUserFriend));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("remove_user_friend"), XmlRpcResponseXmlRPCRemoveUserFriend));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("update_user_friend_perms"), XmlRpcResponseXmlRPCUpdateUserFriendPerms));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_user_friend_list"), XmlRpcResponseXmlRPCGetUserFriendList));
// Protobuf Handlers
m_httpServer.AddStreamHandler(new BufferStreamHandler("POST", "/get_user_friend_list2/", HandleGetUserFriendList2));
}
示例4: RegisterHandlers
public void RegisterHandlers(BaseHttpServer httpServer)
{
m_httpServer = httpServer;
m_httpServer.AddXmlRPCHandler("get_avatar_appearance", XmlRPCGetAvatarAppearance);
m_httpServer.AddXmlRPCHandler("get_bot_outfit", XmlRPCGetBotOutfit);
m_httpServer.AddXmlRPCHandler("update_avatar_appearance", XmlRPCUpdateAvatarAppearance);
m_httpServer.AddXmlRPCHandler("add_bot_outfit", XmlRPCAddBotOutfit);
m_httpServer.AddXmlRPCHandler("remove_bot_outfit", XmlRPCRemoveBotOutfit);
m_httpServer.AddXmlRPCHandler("get_bot_outfits_by_owner", XmlRPCGetBotOutfitsByOwner);
m_httpServer.AddXmlRPCHandler("get_cached_baked_textures", XmlRPCGetCachedBakedTextures);
m_httpServer.AddXmlRPCHandler("set_cached_baked_textures", XmlRPCSetCachedBakedTextures);
// New Style
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_avatar_appearance"), XmlRPCGetAvatarAppearance));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_bot_outfit"), XmlRPCGetBotOutfit));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("update_avatar_appearance"), XmlRPCUpdateAvatarAppearance));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("add_bot_outfit"), XmlRPCAddBotOutfit));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("remove_bot_outfit"), XmlRPCRemoveBotOutfit));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_bot_outfits_by_owner"), XmlRPCGetBotOutfitsByOwner));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_cached_baked_textures"), XmlRPCGetCachedBakedTextures));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("set_cached_baked_textures"), XmlRPCSetCachedBakedTextures));
}
示例5: AddRegion
public void AddRegion(Scene scene)
{
//m_log.InfoFormat("[MONEY]: AddRegion:");
if (scene==null) return;
scene.RegisterModuleInterface<IMoneyModule>(this); // 競合するモジュールの排除
lock (m_sceneList)
{
if (m_sceneList.Count==0)
{
if (!string.IsNullOrEmpty(m_moneyServURL))
{
HttpServer = new BaseHttpServer(9000);
HttpServer.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(scene.RegionInfo));
HttpServer.AddXmlRPCHandler("OnMoneyTransfered", OnMoneyTransferedHandler);
HttpServer.AddXmlRPCHandler("UpdateBalance", BalanceUpdateHandler);
HttpServer.AddXmlRPCHandler("UserAlert", UserAlertHandler);
HttpServer.AddXmlRPCHandler("GetBalance", GetBalanceHandler); // added
HttpServer.AddXmlRPCHandler("AddBankerMoney", AddBankerMoneyHandler); // added
HttpServer.AddXmlRPCHandler("SendMoneyBalance", SendMoneyBalanceHandler); // added
//HttpServer.AddXmlRPCHandler("UploadCovered", UploadCoveredHandler); // added for Aurora-Sim
//HttpServer.AddXmlRPCHandler("UploadCharge", UploadChargeHandler); // added for Aurora-Sim
MainServer.Instance.AddXmlRPCHandler("OnMoneyTransfered", OnMoneyTransferedHandler);
MainServer.Instance.AddXmlRPCHandler("UpdateBalance", BalanceUpdateHandler);
MainServer.Instance.AddXmlRPCHandler("UserAlert", UserAlertHandler);
MainServer.Instance.AddXmlRPCHandler("GetBalance", GetBalanceHandler); // added
MainServer.Instance.AddXmlRPCHandler("AddBankerMoney", AddBankerMoneyHandler); // added
MainServer.Instance.AddXmlRPCHandler("SendMoneyBalance", SendMoneyBalanceHandler); // added
//MainServer.Instance.AddXmlRPCHandler("UploadCovered", UploadCoveredHandler); // added for Aurora-Sim
//MainServer.Instance.AddXmlRPCHandler("UploadCharge", UploadChargeHandler); // added for Aurora-Sim
}
}
if (m_sceneList.ContainsKey(scene.RegionInfo.RegionHandle))
{
m_sceneList[scene.RegionInfo.RegionHandle] = scene;
}
else
{
m_sceneList.Add(scene.RegionInfo.RegionHandle, scene);
}
}
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
// for OpenSim
scene.EventManager.OnMoneyTransfer += MoneyTransferAction;
scene.EventManager.OnValidateLandBuy += ValidateLandBuy;
scene.EventManager.OnLandBuy += processLandBuy;
}
示例6: RegisterHandlers
public void RegisterHandlers(BaseHttpServer httpServer)
{
m_httpServer = httpServer;
m_httpServer.AddStreamHandler(new RestStreamHandler("POST", "/auth/jwt/", RESTRequestToken));
}
示例7: RegisterHandlers
public void RegisterHandlers()
{
//have these in separate method as some servers restart the http server and reregister all the handlers.
m_httpServer = m_gridCore.GetHttpServer();
// Message Server ---> Grid Server
m_httpServer.AddXmlRPCHandler("register_messageserver", XmlRPCRegisterMessageServer);
m_httpServer.AddXmlRPCHandler("deregister_messageserver", XmlRPCDeRegisterMessageServer);
// New Style service interface
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("register_messageserver"), XmlRPCRegisterMessageServer));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("deregister_messageserver"), XmlRPCDeRegisterMessageServer));
}
示例8: PostInitialize
public void PostInitialize()
{
if (IsEnabled())
{
// Start http server
// Attach xmlrpc handlers
m_log.Info("[REMOTE_DATA]: " +
"Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands.");
BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort, null);
// XmlRpc
httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData);
// New Style
httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("llRemoteData"), XmlRpcRemoteData));
httpServer.Start();
}
}
示例9: RegisterHandlers
public void RegisterHandlers()
{
//have these in separate method as some servers restart the http server and reregister all the handlers.
m_httpServer = m_gridCore.GetHttpServer();
// Old Method
m_httpServer.AddXmlRPCHandler("simulator_login", XmlRpcSimulatorLoginMethod);
m_httpServer.AddXmlRPCHandler("simulator_data_request", XmlRpcSimulatorDataRequestMethod);
m_httpServer.AddXmlRPCHandler("simulator_after_region_moved", XmlRpcDeleteRegionMethod);
m_httpServer.AddXmlRPCHandler("map_block", XmlRpcMapBlockMethod);
m_httpServer.AddXmlRPCHandler("search_for_region_by_name", XmlRpcSearchForRegionMethod);
// New Methods
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("simulator_login"), XmlRpcSimulatorLoginMethod));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("simulator_data_request"), XmlRpcSimulatorDataRequestMethod));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("simulator_after_region_moved"), XmlRpcDeleteRegionMethod));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("map_block"), XmlRpcMapBlockMethod));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("search_for_region_by_name"), XmlRpcSearchForRegionMethod));
}
示例10: RegisterHandlers
public void RegisterHandlers(BaseHttpServer httpServer)
{
m_httpServer = httpServer;
// Rest
m_httpServer.AddStreamHandler(new RestStreamHandler("DELETE", "/usersessions/", RestDeleteUserSessionMethod));
m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/users/", RESTGetUserProfile));
//m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/users/", RESTGetUserInterests));
// XmlRpc
m_httpServer.AddXmlRPCHandler("get_user_by_name", XmlRPCGetUserMethodName);
m_httpServer.AddXmlRPCHandler("get_user_by_uuid", XmlRPCGetUserMethodUUID);
m_httpServer.AddXmlRPCHandler("get_avatar_picker_avatar", XmlRPCGetAvatarPickerAvatar);
m_httpServer.AddXmlRPCHandler("update_user_current_region", XmlRPCAtRegion);
m_httpServer.AddXmlRPCHandler("logout_of_simulator", XmlRPCLogOffUserMethodUUID);
m_httpServer.AddXmlRPCHandler("get_agent_by_uuid", XmlRPCGetAgentMethodUUID);
m_httpServer.AddXmlRPCHandler("update_user_profile", XmlRpcResponseXmlRPCUpdateUserProfile);
//m_httpServer.AddXmlRPCHandler("update_user_interests", XmlRpcResponseXmlRPCUpdateUserInterests);
m_httpServer.AddXmlRPCHandler("get_user_preferences", XmlRpcGetUserPreferences);
m_httpServer.AddXmlRPCHandler("save_user_preferences", XmlRpcSaveUserPreferences);
// New Style
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_user_by_name"), XmlRPCGetUserMethodName));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_user_by_uuid"), XmlRPCGetUserMethodUUID));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_avatar_picker_avatar"), XmlRPCGetAvatarPickerAvatar));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("update_user_current_region"), XmlRPCAtRegion));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("logout_of_simulator"), XmlRPCLogOffUserMethodUUID));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_agent_by_uuid"), XmlRPCGetAgentMethodUUID));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("update_user_profile"), XmlRpcResponseXmlRPCUpdateUserProfile));
//m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("update_user_interests"), XmlRpcResponseXmlRPCUpdateUserInterests));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("get_user_preferences"), XmlRpcGetUserPreferences));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("save_user_preferences"), XmlRpcSaveUserPreferences));
}
示例11: RegisterHandlers
public void RegisterHandlers(BaseHttpServer httpServer)
{
m_httpServer = httpServer;
m_httpServer.AddXmlRPCHandler("region_startup", RegionStartup);
m_httpServer.AddXmlRPCHandler("region_shutdown", RegionShutdown);
m_httpServer.AddXmlRPCHandler("agent_location", AgentLocation);
m_httpServer.AddXmlRPCHandler("agent_leaving", AgentLeaving);
// New Style
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("region_startup"), RegionStartup));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("region_shutdown"), RegionShutdown));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("agent_location"), AgentLocation));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("agent_leaving"), AgentLeaving));
// Message Server ---> User Server
m_httpServer.AddXmlRPCHandler("register_messageserver", XmlRPCRegisterMessageServer);
m_httpServer.AddXmlRPCHandler("agent_change_region", XmlRPCUserMovedtoRegion);
m_httpServer.AddXmlRPCHandler("deregister_messageserver", XmlRPCDeRegisterMessageServer);
// New Style
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("register_messageserver"), XmlRPCRegisterMessageServer));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("agent_change_region"), XmlRPCUserMovedtoRegion));
m_httpServer.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("deregister_messageserver"), XmlRPCDeRegisterMessageServer));
}
示例12: RegisterHandlers
public void RegisterHandlers()
{
//have these in separate method as some servers restart the http server and reregister all the handlers.
m_httpServer = m_gridCore.GetHttpServer();
m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/sims/", RestGetSimMethod));
m_httpServer.AddStreamHandler(new RestStreamHandler("POST", "/sims/", RestSetSimMethod));
m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/regions/", RestGetRegionMethod));
m_httpServer.AddStreamHandler(new RestStreamHandler("POST", "/regions/", RestSetRegionMethod));
}
示例13: Initialise
public void Initialise(OpenSimBase openSim)
{
m_log.Info("[MapService]: initialized!");
_app = openSim;
_httpd = openSim.HttpServer;
layerDict = new Dictionary<string, BaseLayer>();
// read app config from OpenSim.MapService.ini
LayerParams objLayerParams = new LayerParams();
LayerParams terrainLayerParams = new LayerParams();
LayerParams agentLayerParams = new LayerParams();
try
{
m_config = new IniConfigSource("OpenSim.MapService.ini");
getLayerParams(m_config.Configs["Object"], ref objLayerParams);
getLayerParams(m_config.Configs["Terrain"], ref terrainLayerParams);
getLayerParams(m_config.Configs["Agent"], ref agentLayerParams);
}
catch (Exception e)
{
Console.WriteLine("Read Map Service config failure");
Console.WriteLine(e.ToString());
}
// initailize new feature layers and register them
m_objectLayer = new ObjectLayer(_app.SceneManager, objLayerParams);
m_terrainLayer = new TerrainLayer(_app.SceneManager, terrainLayerParams);
m_agentLayer = new AgentLayer(_app.SceneManager, agentLayerParams);
layerDict.Add(m_objectLayer.Name, m_objectLayer);
layerDict.Add(m_terrainLayer.Name, m_terrainLayer);
layerDict.Add(m_agentLayer.Name, m_agentLayer);
// register ows handler
string httpMethod = "GET";
string path = "/ows";
OWSStreamHandler h = new OWSStreamHandler(httpMethod, path, owsHandler);
_httpd.AddStreamHandler(h);
}
示例14: AddHandler
/// <summary>
/// Called publicly by server code that is not hosting a scene, but wants remote admin support
/// </summary>
/// <param name="server"></param>
public void AddHandler(BaseHttpServer server)
{
m_log.Info("[RADMIN]: Remote Admin CoreInit");
server.AddStreamHandler(new XmlRpcStreamHandler("POST", Util.XmlRpcRequestPrefix("RemoteAdmin"), XmlRpcCommand));
}
示例15: RegisterHandlers
public void RegisterHandlers(BaseHttpServer httpServer, bool registerLLSDHandler, bool registerOpenIDHandlers)
{
m_httpServer = httpServer;
//m_httpServer.AddXmlRPCHandler("login_to_simulator", XmlRpcLoginMethod);
m_httpServer.AddXmlRPCHandler("login_to_simulator", m_LoginSwitch.XmlRpcLoginMethodSwitch);
m_httpServer.AddHTTPHandler("login", ProcessHTMLLogin);
m_httpServer.AddXmlRPCHandler("set_login_params", XmlRPCSetLoginParams);
//m_httpServer.AddXmlRPCHandler("check_auth_session", XmlRPCCheckAuthSession, false);
m_httpServer.AddXmlRPCHandler("check_auth_session", m_LoginSwitch.XmlRPCCheckAuthSessionSwitch, false);
if (registerLLSDHandler)
{
m_httpServer.SetDefaultLLSDHandler(LLSDLoginMethod);
}
// Handler for the root page
m_httpServer.AddStreamHandler(new RootPageStreamHandler("GET", "/", this));
if (!String.IsNullOrEmpty(m_config.ContentFilePath))
{
// Handler for misc. web content
m_httpServer.AddStreamHandler(new FilesystemStreamHandler("GET", "/content/", m_config.ContentFilePath, this));
}
if (registerOpenIDHandlers)
{
CableBeachLoginService loginService = new CableBeachLoginService(this.UserManager, this.InterInventoryService,
this.LibraryRootFolder, this.m_config, this.WelcomeMessage, this.RegionProfileService);
CableBeachState.LoginService = loginService;
// Handler for OpenID avatar identity pages
m_httpServer.AddStreamHandler(new OpenIdUserPageStreamHandler("GET", "/users/", this));
// Handlers for the OpenID endpoint server
m_httpServer.AddStreamHandler(new OpenIdProviderStreamHandler("POST", "/openid/server", this));
m_httpServer.AddStreamHandler(new OpenIdProviderStreamHandler("GET", "/openid/server", this));
// Handlers for the Cable Beach login page
m_httpServer.AddStreamHandler(new OpenIdLoginStreamHandler("POST", "/login", this));
m_httpServer.AddStreamHandler(new OpenIdLoginStreamHandler("GET", "/login", this));
// Handler for the Facebook Connect login path
m_httpServer.AddStreamHandler(new FacebookStreamHandler("GET", "/facebook/login", this));
}
}