OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
/// <summary>
/// This is the worker function to send AgentData to a neighbor region
/// </summary>
This is the worker function to send AgentData to a neighbor region
This is the worker function to send AgentData to a neighbor region
private bool UpdateAgent(GridRegion destination, IAgentData cAgentData, int timeout)
        {
            string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
            try
            {
                OSDMap args = cAgentData.Pack();
                args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
                args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
                args["destination_name"] = OSD.FromString(destination.RegionName);
                args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
                OSDMap result = WebUtil.PutToServiceCompressed(uri, args, timeout);
                if (result["Success"].AsBoolean())
                    return true;
                result = WebUtil.PutToService(uri, args, timeout);
                return result["Success"].AsBoolean();
            }
            catch (Exception e)
            {
                m_log.Warn("[REMOTE SIMULATION CONNECTOR]: UpdateAgent failed with exception: " + e.ToString());
            }
            return false;
        }
private bool UpdateAgent ( GridRegion destination , IAgentData cAgentData , int timeout ) { string uri = destination . ServerURI + AgentPath ( ) + cAgentData . AgentID + " " ; try { OSDMap args = cAgentData . Pack ( ) ; args [ " " ] = OSD . FromString ( destination . RegionLocX . ToString ( ) ) ; args [ " " ] = OSD . FromString ( destination . RegionLocY . ToString ( ) ) ; args [ " " ] = OSD . FromString ( destination . RegionName ) ; args [ " " ] = OSD . FromString ( destination . RegionID . ToString ( ) ) ; OSDMap result = WebUtil . PutToServiceCompressed ( uri , args , timeout ) ; if ( result [ " " ] . AsBoolean ( ) ) return true ; result = WebUtil . PutToService ( uri , args , timeout ) ; return result [ " " ] . AsBoolean ( ) ; } catch ( Exception e ) { m_log . Warn ( " " + e . ToString ( ) ) ; } return false ; }
This is the worker function to send AgentData to a neighbor region
This is the worker function to send AgentData to a neighbor region
// m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: UpdateAgent in {0}", destination.ServerURI); // Eventually, we want to use a caps url instead of the agentID
destination
GridRegion
cAgentData
IAgentData
timeout
int