public override async Task<IPAddress> GetExternalIPAsync() { var message = new GetExternalIPAddressRequestMessage(); var responseData = await _soapClient .InvokeAsync("GetExternalIPAddress", message.ToXml()) .TimeoutAfter(TimeSpan.FromSeconds(4)); var response = new GetExternalIPAddressResponseMessage(responseData, DeviceInfo.ServiceType); return response.ExternalIPAddress; }
public override async Task <IPAddress> GetExternalIPAsync() { var message = new GetExternalIPAddressRequestMessage(); var responseData = await _soapClient .InvokeAsync("GetExternalIPAddress", message.ToXml()) .TimeoutAfter(TimeSpan.FromSeconds(4)); var response = new GetExternalIPAddressResponseMessage(responseData, DeviceInfo.ServiceType); return(response.ExternalIPAddress); }
public override Task<IPAddress> GetExternalIPAsync() { NatDiscoverer.TraceSource.LogInfo("GetExternalIPAsync - Getting external IP address"); var message = new GetExternalIPAddressRequestMessage(); return _soapClient .InvokeAsync("GetExternalIPAddress", message.ToXml()) .TimeoutAfter(TimeSpan.FromSeconds(4)) .ContinueWith(task => { var responseData = task.Result; var response = new GetExternalIPAddressResponseMessage(responseData, DeviceInfo.ServiceType); return response.ExternalIPAddress; }); }
public override Task <IPAddress> GetExternalIPAsync() { NatDiscoverer.TraceSource.LogInfo("GetExternalIPAsync - Getting external IP address"); var message = new GetExternalIPAddressRequestMessage(); return(_soapClient .InvokeAsync("GetExternalIPAddress", message.ToXml()) .TimeoutAfter(TimeSpan.FromSeconds(4)) .ContinueWith(task => { var responseData = task.Result; var response = new GetExternalIPAddressResponseMessage(responseData, DeviceInfo.ServiceType); return response.ExternalIPAddress; })); }