<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://osimdev.org/wiki/index.php?action=history&amp;feed=atom&amp;title=OpenSimulator_Internals%2FConnector_Architecture%2FUserAgent_Connector</id>
	<title>OpenSimulator Internals/Connector Architecture/UserAgent Connector - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://osimdev.org/wiki/index.php?action=history&amp;feed=atom&amp;title=OpenSimulator_Internals%2FConnector_Architecture%2FUserAgent_Connector"/>
	<link rel="alternate" type="text/html" href="http://osimdev.org/wiki/index.php?title=OpenSimulator_Internals/Connector_Architecture/UserAgent_Connector&amp;action=history"/>
	<updated>2026-08-04T15:31:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>http://osimdev.org/wiki/index.php?title=OpenSimulator_Internals/Connector_Architecture/UserAgent_Connector&amp;diff=79&amp;oldid=prev</id>
		<title>Jwbshaw: first</title>
		<link rel="alternate" type="text/html" href="http://osimdev.org/wiki/index.php?title=OpenSimulator_Internals/Connector_Architecture/UserAgent_Connector&amp;diff=79&amp;oldid=prev"/>
		<updated>2026-07-07T12:23:52Z</updated>

		<summary type="html">&lt;p&gt;first&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= OpenSimulator Internals/Connector Architecture/UserAgent Connector =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
UserAgentServiceConnector is the remote connector for IUserAgentService. It is used by foreign grids to talk to a home grid&amp;#039;s UserAgentService -- verifying agents, getting home region info, and checking online friends. It extends SimulationServiceConnector, inheriting the agent transfer path and overriding the agent URL path.&lt;br /&gt;
&lt;br /&gt;
Source file:&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Inheritance ===&lt;br /&gt;
&lt;br /&gt;
Extends SimulationServiceConnector. Overrides:&lt;br /&gt;
* AgentPath() -- returns &amp;quot;homeagent/&amp;quot; instead of &amp;quot;agent/&amp;quot;&lt;br /&gt;
* PackData() -- adds gatekeeper_serveruri, gatekeeper_host, gatekeeper_port, destination_serveruri to the OSD payload&lt;br /&gt;
&lt;br /&gt;
This means CreateAgent() from the parent class sends to destination.ServerURI + &amp;quot;homeagent/&amp;quot; + agentID + &amp;quot;/&amp;quot; when called through this connector.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Initialisation ===&lt;br /&gt;
&lt;br /&gt;
Two constructors:&lt;br /&gt;
* String URL -- validates URI, normalizes to lowercase with trailing slash&lt;br /&gt;
* IConfigSource -- reads HomeURL from GridInfo; throws if missing or invalid&lt;br /&gt;
&lt;br /&gt;
No config section key -- the URL is taken from GridInfo.HomeURL, which reads from [Const], [Startup], or [Hypergrid] sections.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Transport -- Two Protocols ===&lt;br /&gt;
&lt;br /&gt;
This connector uses two different transports depending on the method:&lt;br /&gt;
&lt;br /&gt;
Agent transfer (inherited from SimulationServiceConnector):&lt;br /&gt;
* LoginAgentToGrid() calls CreateAgent() -- uses WebUtil OSD/LLSD over HTTP POST/PUT to &amp;quot;homeagent/&amp;quot; path&lt;br /&gt;
&lt;br /&gt;
All other methods:&lt;br /&gt;
* Use XML-RPC via Nwc.XmlRpc over HTTP POST to m_ServerURL&lt;br /&gt;
* CallServer() is the shared helper for XML-RPC calls that return a Hashtable&lt;br /&gt;
* GetBoolResponse() is the shared helper for XML-RPC calls that return a bool via a &amp;quot;result&amp;quot; key&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== LoginAgentToGrid() ===&lt;br /&gt;
&lt;br /&gt;
Two overloads:&lt;br /&gt;
&lt;br /&gt;
 public bool LoginAgentToGrid(GridRegion source, AgentCircuitData aCircuit, GridRegion gatekeeper,&lt;br /&gt;
     GridRegion destination, bool fromLogin, out string reason)&lt;br /&gt;
&lt;br /&gt;
Constructs a synthetic home GridRegion using m_ServerURL as ServerURI, then calls the parent CreateAgent(). Teleport flag is ViaLogin if fromLogin, ViaHome otherwise. Stores gatekeeper in m_Gatekeeper for use by PackData().&lt;br /&gt;
&lt;br /&gt;
 public bool LoginAgentToGrid(GridRegion source, AgentCircuitData aCircuit, GridRegion gatekeeper,&lt;br /&gt;
     GridRegion destination, out string reason)&lt;br /&gt;
&lt;br /&gt;
Always passes fromLogin = false. Used by simulators.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== XML-RPC Methods ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Method !! XmlRpc method !! Returns !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| GetHomeRegion(userID, out position, out lookAt) || &amp;quot;get_home_region&amp;quot; || GridRegion || Parses full GridRegion from Hashtable; returns null on failure&lt;br /&gt;
|-&lt;br /&gt;
| IsAgentComingHome(sessionID, thisGridExternalName) || &amp;quot;agent_is_coming_home&amp;quot; || bool || Via GetBoolResponse()&lt;br /&gt;
|-&lt;br /&gt;
| VerifyAgent(sessionID, token) || &amp;quot;verify_agent&amp;quot; || bool || Via GetBoolResponse()&lt;br /&gt;
|-&lt;br /&gt;
| VerifyClient(sessionID, token) || &amp;quot;verify_client&amp;quot; || bool || Via GetBoolResponse()&lt;br /&gt;
|-&lt;br /&gt;
| LogoutAgent(userID, sessionID) || &amp;quot;logout_agent&amp;quot; || void || Calls GetBoolResponse() but discards result&lt;br /&gt;
|-&lt;br /&gt;
| GetUserInfo(userID) || &amp;quot;get_user_info&amp;quot; || Dictionary&amp;lt;string,object&amp;gt; || All non-null Hashtable entries returned&lt;br /&gt;
|-&lt;br /&gt;
| GetServerURLs(userID) || &amp;quot;get_server_urls&amp;quot; || Dictionary&amp;lt;string,object&amp;gt; || Only SRV_-prefixed keys returned; &amp;quot;SRV_&amp;quot; prefix stripped&lt;br /&gt;
|-&lt;br /&gt;
| LocateUser(userID) || &amp;quot;locate_user&amp;quot; || string || Returns hash[&amp;quot;URL&amp;quot;] or empty string&lt;br /&gt;
|-&lt;br /&gt;
| GetUUI(userID, targetUserID) || &amp;quot;get_uui&amp;quot; || string || Returns hash[&amp;quot;UUI&amp;quot;] or empty string&lt;br /&gt;
|-&lt;br /&gt;
| GetUUID(first, last) || &amp;quot;get_uuid&amp;quot; || UUID || Throws on missing or unparseable UUID response&lt;br /&gt;
|-&lt;br /&gt;
| StatusNotification(friends, userID, online) || &amp;quot;status_notification&amp;quot; || List&amp;lt;UUID&amp;gt; || [Obsolete]; friends sent as friend_0, friend_1...; returns online UUIDs&lt;br /&gt;
|-&lt;br /&gt;
| GetOnlineFriends(userID, friends) || &amp;quot;get_online_friends&amp;quot; || List&amp;lt;UUID&amp;gt; || [Obsolete]; same encoding as StatusNotification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
GetHomeRegion() field parsing: uuid, x, y, size_x, size_y, region_name, hostname, http_port, server_uri, internal_port, position, lookAt. All fields checked for null before parsing. Missing fields silently use zero/default values.&lt;br /&gt;
&lt;br /&gt;
GetServerURLs() strips the &amp;quot;SRV_&amp;quot; prefix from keys, returning just the service type name.&lt;br /&gt;
&lt;br /&gt;
GetUUID() throws on failure -- the only method in this connector that throws instead of returning a sentinel value.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== SetClientToken() ===&lt;br /&gt;
&lt;br /&gt;
No-op. Accepted but does nothing.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
&lt;br /&gt;
* This connector uses XML-RPC for most operations and OSD/REST for agent transfer -- two different protocols in the same class.&lt;br /&gt;
* StatusNotification() and GetOnlineFriends() are both marked [Obsolete]. Exception catch blocks in both methods silently swallow all exceptions with no logging.&lt;br /&gt;
* LogoutAgent() discards the bool result from GetBoolResponse() -- callers cannot detect failure.&lt;br /&gt;
* GetUUID() is the only method that throws on error rather than returning null/empty/false.&lt;br /&gt;
* The error message in GetBoolResponse() for &amp;quot;THIS IS BAAAAD&amp;quot; is verbatim from the source.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[OpenSimulator Internals/Connector Architecture]]&lt;br /&gt;
* [[OpenSimulator Internals/Connector Architecture/Simulation Connector]]&lt;br /&gt;
* [[OpenSimulator Internals/Code Map/ROBUST/UserAgentService]]&lt;br /&gt;
* [[OpenSimulator Internals/Code Map/ROBUST/GatekeeperService]]&lt;/div&gt;</summary>
		<author><name>Jwbshaw</name></author>
	</entry>
</feed>