예제 #1
0
        Boolean CheckFilter(IPEndPoint remote)
        {
            // IPAddress是类,不同实例对象当然不相等啦
            if (!_Filter.IsAny())
            {
                if (!_Filter.Equals(remote))
                {
                    return(false);
                }
            }

            return(true);
        }
예제 #2
0
        Boolean CheckFilter(IPEndPoint remote)
        {
            // IPAddress是类,不同实例对象当然不相等啦
            if (!_Filter.IsAny())
            {
                //if (_Filter.Address != remote.Address || _Filter.Port != remote.Port) return false;
                if (!_Filter.Equals(remote))
                {
                    return(false);
                }
            }

            return(true);
        }