public String GetUsrLst(String sIP) { try { int i; String sRet = ""; for (i = 0; i < _listUsr.Count; i++) { User usr = (User)_listUsr[i]; if (usr.GetIP() != sIP) { sRet += usr.GetUser() + "|"; } } return(sRet); } catch (Exception) { } return(""); }
public User GetUserFromIP(String sIP) { User usr = null; try { int i; for (i = 0; i < _listUsr.Count && usr == null; i++) { User tmp = (User)_listUsr[i]; if (tmp.GetIP() == sIP) { usr = tmp; } } } catch (Exception) { } return(usr); }
public bool HeartBeatUser(String sIP) { bool bFound = false; try { int i; for (i = 0; i < _listUsr.Count && !bFound; i++) { User tmp = (User)_listUsr[i]; if (tmp.GetIP() == sIP) { tmp.SetHearBeat(true); bFound = true; } } } catch (Exception) { } return(bFound); }