当前位置: 首页>>代码示例>>C#>>正文


C# LLClientView.Start方法代码示例

本文整理汇总了C#中LLClientView.Start方法的典型用法代码示例。如果您正苦于以下问题:C# LLClientView.Start方法的具体用法?C# LLClientView.Start怎么用?C# LLClientView.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLClientView的用法示例。


在下文中一共展示了LLClientView.Start方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddClient

        /// <summary>
        /// Add a client.
        /// </summary>
        /// <param name="circuitCode"></param>
        /// <param name="agentID"></param>
        /// <param name="sessionID"></param>
        /// <param name="remoteEndPoint"></param>
        /// <param name="sessionInfo"></param>
        /// <returns>The client if it was added.  Null if the client already existed.</returns>
        protected virtual IClientAPI AddClient(
            uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
        {
            IClientAPI client = null;

            // We currently synchronize this code across the whole scene to avoid issues such as
            // http://opensimulator.org/mantis/view.php?id=5365  However, once locking per agent circuit can be done
            // consistently, this lock could probably be removed.
            lock (this)
            {
                if (!m_scene.TryGetClient(agentID, out client))
                {
                    LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
    
                    client = new LLClientView(m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
                    client.OnLogout += LogoutHandler;
                    client.DebugPacketLevel = DefaultClientPacketDebugLevel;
    
                    ((LLClientView)client).DisableFacelights = m_disableFacelights;
    
                    client.Start();
                }
            }

            return client;
        }
开发者ID:JeffCost,项目名称:opensim,代码行数:35,代码来源:LLUDPServer.cs

示例2: AddClient

        protected virtual void AddClient(uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
        {
            // Create the LLUDPClient
            LLUDPClient udpClient = new LLUDPClient(this, m_throttleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
            IClientAPI existingClient;

            if (!m_scene.TryGetClient(agentID, out existingClient))
            {
                // Create the LLClientView
                LLClientView client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
                client.OnLogout += LogoutHandler;

                client.DisableFacelights = m_disableFacelights;

                // Start the IClientAPI
                client.Start();
            }
            else
            {
                m_log.WarnFormat("[LLUDPSERVER]: Ignoring a repeated UseCircuitCode from {0} at {1} for circuit {2}",
                    udpClient.AgentID, remoteEndPoint, circuitCode);
            }
        }
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:23,代码来源:LLUDPServer.cs

示例3: AddClient

        /// <summary>
        /// Add a client.
        /// </summary>
        /// <param name="circuitCode"></param>
        /// <param name="agentID"></param>
        /// <param name="sessionID"></param>
        /// <param name="remoteEndPoint"></param>
        /// <param name="sessionInfo"></param>
        /// <returns>The client if it was added.  Null if the client already existed.</returns>
        protected virtual IClientAPI AddClient(
            uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
        {
            IClientAPI client = null;

            // In priciple there shouldn't be more than one thread here, ever.
            // But in case that happens, we need to synchronize this piece of code
            // because it's too important
            lock (this) 
            {
                if (!m_scene.TryGetClient(agentID, out client))
                {
                    LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);

                    client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
                    client.OnLogout += LogoutHandler;

                    ((LLClientView)client).DisableFacelights = m_disableFacelights;

                    client.Start();
                }
            }

            return client;
        }
开发者ID:OpenPlex-Sim,项目名称:opensim,代码行数:34,代码来源:LLUDPServer.cs

示例4: AddClient

        protected virtual void AddClient(uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
        {
            // In priciple there shouldn't be more than one thread here, ever.
            // But in case that happens, we need to synchronize this piece of code
            // because it's too important
            lock (this) 
            {
                IClientAPI existingClient;

                if (!m_scene.TryGetClient(agentID, out existingClient))
                {
                    // Create the LLUDPClient
                    LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
                    // Create the LLClientView
                    LLClientView client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
                    client.OnLogout += LogoutHandler;

                    client.DisableFacelights = m_disableFacelights;

                    // Start the IClientAPI
                    client.Start();

                }
                else
                {
                    m_log.WarnFormat("[LLUDPSERVER]: Ignoring a repeated UseCircuitCode from {0} at {1} for circuit {2}",
                        existingClient.AgentId, remoteEndPoint, circuitCode);
                }
            }
        }
开发者ID:BackupTheBerlios,项目名称:seleon,代码行数:30,代码来源:LLUDPServer.cs

示例5: AddNewClient

        private bool AddNewClient(UseCircuitCodePacket useCircuitCode, IPEndPoint remoteEndPoint)
        {
            UUID agentID = useCircuitCode.CircuitCode.ID;
            UUID sessionID = useCircuitCode.CircuitCode.SessionID;
            uint circuitCode = useCircuitCode.CircuitCode.Code;

            try
            {
                m_log.InfoFormat(
                        "[LLUDPSERVER]: UCC Received for client {0} circuit code {1}",
                        useCircuitCode.CircuitCode.ID, useCircuitCode.CircuitCode.Code);

                LLUDPClient udpClient = new LLUDPClient(this, m_throttleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
                LLClientView client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, agentID, sessionID, circuitCode);

                m_scene.ConnectionManager.TryAttachUdpCircuit(client);
                client.Start();

                return true;
            }
            catch (OpenSim.Region.Framework.Connection.AttachUdpCircuitException e)
            {
                if (e.CircuitAlreadyExisted)
                {
                    m_log.WarnFormat("[LLUDPSERVER]: Ignoring duplicate UDP connection request. {0}", e.Message);

                    //if the circuit matches, we can ACK the UCC since the client should be
                    //able to communicate with the current circuit
                    if (e.ExistingCircuitMatched)
                    {
                        return true;
                    }
                    else
                    {
                        return false;
                    }
                }
                else
                {
                    m_log.ErrorFormat("[LLUDPSERVER]: Unable to start new connection: {0}", e);
                    return false;
                }
            }
        }
开发者ID:digitalmystic,项目名称:halcyon,代码行数:44,代码来源:LLUDPServer.cs

示例6: AddClient

        protected virtual bool AddClient(uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
        {
            // Create the LLUDPClient
            LLUDPClient udpClient = new LLUDPClient(this, m_throttleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
            IClientAPI existingClient;
            //Check to make sure we arn't handling two or more circuit codes from the client if we are lagging badly.
            // The block below this (TryGetClient) works as well, but if it gets locked up before the client is added to the scene, it will break
            //  So we do this check here as well.
            lock (m_handlingCircuitCodes)
            {
                if (m_handlingCircuitCodes.Contains(agentID))
                    return false;
                m_handlingCircuitCodes.Add(agentID);
            }

            if (!m_scene.TryGetClient(agentID, out existingClient))
            {
                // Create the LLClientView
                LLClientView client = new LLClientView(remoteEndPoint, m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
                client.OnLogout += LogoutHandler;

                client.DisableFacelights = m_disableFacelights;

                // Start the IClientAPI
                client.Start();
                //Remove it from the check
                m_handlingCircuitCodes.Remove(agentID);
                return true;
            }
            else
            {
                m_log.WarnFormat("[LLUDPSERVER]: Ignoring a repeated UseCircuitCode from {0} at {1} for circuit {2}",
                    udpClient.AgentID, remoteEndPoint, circuitCode);
            }
            //Remove it from the check
            m_handlingCircuitCodes.Remove(agentID);
            return false;
        }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:38,代码来源:LLUDPServer.cs


注:本文中的LLClientView.Start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。