Example #1
0
		private void HostIPResolved(IAsyncResult result)
		{
			try
			{
				AsyncStateForIP state = (AsyncStateForIP)result.AsyncState;
				IPHostEntry entry = state._resolveMethod.EndInvoke(result);
				if(entry != null)
					state._storeResultMethod(entry.AddressList);
			}
			catch { }
		}
Example #2
0
		public void ResolveHostIP(string name, StoreHostIPDelegate callback)
		{
			AsyncStateForIP state = new AsyncStateForIP(new GetHostEntryDelegate(GetHostEntry), callback);
			state._resolveMethod.BeginInvoke(name, new AsyncCallback(HostIPResolved), state);
		}
 public void ResolveHostIP(string name, StoreHostIPDelegate callback)
 {
     AsyncStateForIP state = new AsyncStateForIP(new GetHostEntryDelegate(GetHostEntry), callback);
     state._resolveMethod.BeginInvoke(name, new AsyncCallback(HostIPResolved), state);
 }