VideoCallServer.User.GetOnlyIP C# (CSharp) Method

GetOnlyIP() public method

public GetOnlyIP ( ) : string
return string
        public string GetOnlyIP()
        {
            return _sIP;
        }

Usage Example

Beispiel #1
0
        public User GetUserFromIPNoPort(String sIP)
        {
            string sAddr = sIP.Substring(0, sIP.LastIndexOf(':'));
            User   usr   = null;

            try
            {
                int i;
                for (i = 0; i < _listUsr.Count && usr == null; i++)
                {
                    User tmp = (User)_listUsr[i];
                    if (tmp.GetOnlyIP() == sAddr)
                    {
                        usr = tmp;
                    }
                }
            }
            catch (Exception)
            {
            }
            return(usr);
        }