<?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%2FPresence_Connector</id>
	<title>OpenSimulator Internals/Connector Architecture/Presence 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%2FPresence_Connector"/>
	<link rel="alternate" type="text/html" href="http://osimdev.org/wiki/index.php?title=OpenSimulator_Internals/Connector_Architecture/Presence_Connector&amp;action=history"/>
	<updated>2026-08-04T15:32:14Z</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/Presence_Connector&amp;diff=71&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/Presence_Connector&amp;diff=71&amp;oldid=prev"/>
		<updated>2026-07-07T12:16:14Z</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/Presence Connector =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
PresenceServicesConnector is the simulator-side remote connector for IPresenceService. It translates IPresenceService calls into HTTP POST requests to the ROBUST Presence handler at /presence.&lt;br /&gt;
&lt;br /&gt;
Source file:&lt;br /&gt;
&lt;br /&gt;
 OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Initialisation ===&lt;br /&gt;
&lt;br /&gt;
Config section: [PresenceService]&lt;br /&gt;
&lt;br /&gt;
Required key:&lt;br /&gt;
* PresenceServerURI -- URL of the ROBUST Presence endpoint; throws if missing&lt;br /&gt;
&lt;br /&gt;
Base class BaseServiceConnector.Initialise() called for auth setup.&lt;br /&gt;
&lt;br /&gt;
Three constructors:&lt;br /&gt;
* Default (no args) -- URI must be set externally&lt;br /&gt;
* String URI -- used by callers that pass the URI directly&lt;br /&gt;
* IConfigSource -- calls Initialise(), normal grid mode&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Transport ===&lt;br /&gt;
&lt;br /&gt;
All methods POST to m_ServerURI + &amp;quot;/presence&amp;quot; using SynchronousRestFormsRequester.&lt;br /&gt;
&lt;br /&gt;
All requests include:&lt;br /&gt;
* VERSIONMIN / VERSIONMAX -- protocol version negotiation&lt;br /&gt;
* METHOD -- identifies the operation&lt;br /&gt;
&lt;br /&gt;
Success detection for login/logout/report methods:&lt;br /&gt;
* LoginAgent, LogoutAgent, LogoutRegionAgents: scan raw reply string for &amp;quot;success&amp;quot; (case-insensitive substring search -- not XML parse)&lt;br /&gt;
* ReportAgent: parses XML response, checks result field == &amp;quot;success&amp;quot;&lt;br /&gt;
* All return false on empty reply or exception&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Methods ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Method !! METHOD field !! Fields sent !! Returns&lt;br /&gt;
|-&lt;br /&gt;
| LoginAgent(userID, sessionID, secureSessionID) || &amp;quot;login&amp;quot; || UserID, SessionID, SecureSessionID || bool&lt;br /&gt;
|-&lt;br /&gt;
| LogoutAgent(sessionID) || &amp;quot;logout&amp;quot; || SessionID || bool&lt;br /&gt;
|-&lt;br /&gt;
| LogoutRegionAgents(regionID) || &amp;quot;logoutregion&amp;quot; || RegionID || bool&lt;br /&gt;
|-&lt;br /&gt;
| ReportAgent(sessionID, regionID) || &amp;quot;report&amp;quot; || SessionID, RegionID || bool&lt;br /&gt;
|-&lt;br /&gt;
| GetAgent(sessionID) || &amp;quot;getagent&amp;quot; || SessionID || PresenceInfo or null&lt;br /&gt;
|-&lt;br /&gt;
| GetAgents(string[] userIDs) || &amp;quot;getagents&amp;quot; || uuids (List&amp;lt;string&amp;gt;) || PresenceInfo[] or null&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
GetAgent():&lt;br /&gt;
* Parses XML response&lt;br /&gt;
* Returns PresenceInfo constructed from result dictionary&lt;br /&gt;
* Returns null if result == &amp;quot;null&amp;quot;, reply is empty, or result is not a dictionary&lt;br /&gt;
&lt;br /&gt;
GetAgents():&lt;br /&gt;
* Sends userIDs as uuids key (List&amp;lt;string&amp;gt;)&lt;br /&gt;
* Iterates all values in reply dictionary, constructs PresenceInfo for each dictionary entry&lt;br /&gt;
* Returns empty array if result == &amp;quot;null&amp;quot; or &amp;quot;Failure&amp;quot;&lt;br /&gt;
* Returns null on empty reply or exception&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
&lt;br /&gt;
* LoginAgent, LogoutAgent, and LogoutRegionAgents use raw string search for &amp;quot;success&amp;quot; rather than XML parsing -- different from ReportAgent which parses XML. This is inconsistent within the same file.&lt;br /&gt;
* ScopeID fields are present in the code but commented out throughout.&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/Code Map/ROBUST/PresenceService]]&lt;br /&gt;
* [[OpenSimulator Internals/Code Map/Shared]]&lt;/div&gt;</summary>
		<author><name>Jwbshaw</name></author>
	</entry>
</feed>