Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetAddressAndSendAsync()

async Task< PingReply > System.Net.NetworkInformation.Ping.GetAddressAndSendAsync ( string hostNameOrAddress,
int timeout,
byte[] buffer,
PingOptions options )
inlineprivate

Definition at line 392 of file Ping.cs.

393 {
394 CheckStart();
395 try
396 {
397 Task<PingReply> task = SendPingAsyncCore((await Dns.GetHostAddressesAsync(hostNameOrAddress).ConfigureAwait(continueOnCapturedContext: false))[0], buffer, timeout, options);
398 return await task.ConfigureAwait(continueOnCapturedContext: false);
399 }
400 catch (Exception innerException)
401 {
402 throw new PingException(System.SR.net_ping, innerException);
403 }
404 finally
405 {
406 Finish();
407 }
408 }
Task< PingReply > SendPingAsyncCore(IPAddress address, byte[] buffer, int timeout, PingOptions options)
Definition Ping.cs:452
static string net_ping
Definition SR.cs:20
Definition SR.cs:7
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226

References System.buffer, System.Net.NetworkInformation.Ping.CheckStart(), System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.Net.NetworkInformation.Ping.Finish(), System.Net.Dns.GetHostAddressesAsync(), System.SR.net_ping, System.options, System.Net.NetworkInformation.Ping.SendPingAsyncCore(), System.task, and System.timeout.

Referenced by System.Net.NetworkInformation.Ping.SendPingAsync().