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


C# LLClientView.Kick方法代码示例

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


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

示例1: DeactivateClientDueToTimeout

        /// <summary>
        /// Deactivates the client if we don't receive any packets within a certain amount of time (default 60 seconds).
        /// </summary>
        /// <remarks>
        /// If a connection is active then we will always receive packets even if nothing else is happening, due to
        /// regular client pings.
        /// </remarks>
        /// <param name='client'></param>
        /// <param name='timeoutTicks'></param>
        private void DeactivateClientDueToTimeout(LLClientView client, int timeoutTicks)
        {
            lock (client.CloseSyncLock)
            {    
                ClientLogoutsDueToNoReceives++;

                m_log.WarnFormat(
					"[LLUDPSERVER]: Ack timeout, disconnecting {0} agent for {1} in {2} for {3}ms",
					client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, m_scene.Name, timeoutTicks);
    
                if (!client.SceneAgent.IsChildAgent)
                     client.Kick("Simulator logged you out due to connection timeout.");
            }

            m_scene.CloseAgent(client.AgentId, true);
        }
开发者ID:AkiraSonoda,项目名称:akisim,代码行数:25,代码来源:LLUDPServer.cs

示例2: DeactivateClientDueToTimeout

        /// <summary>
        /// Deactivates the client if we don't receive any packets within a certain amount of time (default 60 seconds).
        /// </summary>
        /// <remarks>
        /// If a connection is active then we will always receive packets even if nothing else is happening, due to
        /// regular client pings.
        /// </remarks>
        /// <param name='client'></param>
        /// <param name='timeoutTicks'></param>
        private void DeactivateClientDueToTimeout(LLClientView client, int timeoutTicks)
        {
            lock (client.CloseSyncLock)
            {    
                ClientLogoutsDueToNoReceives++;

                m_log.WarnFormat(
                    "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}.  Disconnecting.",
                    client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, m_scene.Name);
    
                if (!client.SceneAgent.IsChildAgent)
                     client.Kick("Simulator logged you out due to connection timeout.");
            }

            m_scene.IncomingCloseAgent(client.AgentId, true);
        }
开发者ID:JeffCost,项目名称:opensim,代码行数:25,代码来源:LLUDPServer.cs

示例3: DeactivateClientDueToTimeout

     /// <summary>
     /// Deactivates the client if we don't receive any packets within a certain amount of time (default 60 seconds).
     /// </summary>
     /// <remarks>
     /// If a connection is active then we will always receive packets even if nothing else is happening, due to
     /// regular client pings.
     /// </remarks>
     /// <param name='client'></param>
     private void DeactivateClientDueToTimeout(LLClientView client)
     {
         lock (client.CloseSyncLock)
         {
             m_log.WarnFormat(
                 "[LLUDPSERVER]: Ack timeout, disconnecting {0} agent for {1} in {2}",
                 client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, m_scene.RegionInfo.RegionName);
 
             StatsManager.SimExtraStats.AddAbnormalClientThreadTermination();
 
             if (!client.SceneAgent.IsChildAgent)
                  client.Kick("Simulator logged you out due to connection timeout");
 
             client.CloseWithoutChecks();
         }
     }
开发者ID:TheCoffeeTime,项目名称:Opensim,代码行数:24,代码来源:LLUDPServer.cs


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