コード例 #1
0
        public void CheckTimeOut(object Obj, EventArgs Args)
        {
            lock (_Clients)
            {
                List <ClientInfo> Infos = new List <ClientInfo>();

                foreach (ClientInfo Info in _Clients.Values)
                {
                    if (Info.Update())
                    {
                        Infos.Add(Info);
                    }
                }

                foreach (ClientInfo Info in Infos)
                {
                    Log.Error("RpcServer", "Client disconnected : " + Info._Id);

                    _Clients.Remove(Info._Id);

                    foreach (ARpc Rp in _Rpcs)
                    {
                        Rp.Disconnected(Info._Id);
                    }
                }
            }
        }