OpenSim.Region.Framework.Scenes.Scene.NewUserConnection C# (CSharp) Method

NewUserConnection() public method

Do the work necessary to initiate a new user connection for a particular scene. At the moment, this consists of setting up the caps infrastructure The return bool should allow for connections to be refused, but as not all calling paths take proper notice of it let, we allowed banned users in still.
public NewUserConnection ( AgentCircuitData agent, uint teleportFlags, string &reason ) : bool
agent AgentCircuitData CircuitData of the agent who is connecting
teleportFlags uint
reason string Outputs the reason for the false response on this string
return bool
        public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason)
        {
            return NewUserConnection(agent, teleportFlags, out reason, true);
        }

Same methods

Scene::NewUserConnection ( AgentCircuitData agent, uint teleportFlags, string &reason, bool requirePresenceLookup ) : bool

Usage Example

Ejemplo n.º 1
0
        /// <summary>
        /// Introduce an agent into the scene by adding a new client.
        /// </summary>
        /// <returns>The scene presence added</returns>
        /// <param name='scene'></param>
        /// <param name='testClient'></param>
        /// <param name='agentData'></param>
        /// <param name='tf'></param>
        private static ScenePresence IntroduceClientToScene(
            Scene scene, IClientAPI client, AgentCircuitData agentData, TeleportFlags tf)
        {
            string reason;

            // Stage 1: tell the scene to expect a new user connection
            if (!scene.NewUserConnection(agentData, (uint)tf, null, out reason))
                Console.WriteLine("NewUserConnection failed: " + reason);

            // Stage 2: add the new client as a child agent to the scene
            scene.AddNewAgent(client, PresenceType.User);

            return scene.GetScenePresence(client.AgentId);
        }
All Usage Examples Of OpenSim.Region.Framework.Scenes.Scene::NewUserConnection
Scene