示例#1
0
 private IPHostEntry GetHostByAddress(IPAddress address)
 {
     if (fCachedLookup == null || !fCachedLookup.LookupAddress.Equals(address))
     {
         // If name resolution fails, this will throw an exception
         IPHostEntry entry = Dns.GetHostEntry(address);
         fCachedLookup = new CachedHostLookup(address, entry);
     }
     return(fCachedLookup.Entry);
 }
示例#2
0
 private IPHostEntry GetHostByAddress( IPAddress address )
 {
     if ( fCachedLookup == null || !fCachedLookup.LookupAddress.Equals( address ) )
     {
         // If name resolution fails, this will throw an exception
         IPHostEntry entry = Dns.GetHostEntry( address );
         fCachedLookup = new CachedHostLookup( address, entry );
     }
     return fCachedLookup.Entry;
 }