System.Net.NetworkInformation.Ping.SendPingAsyncCore C# (CSharp) Method

SendPingAsyncCore() private method

private SendPingAsyncCore ( IPAddress address, byte buffer, int timeout, PingOptions options ) : Task
address IPAddress
buffer byte
timeout int
options PingOptions
return Task
        private async Task<PingReply> SendPingAsyncCore(IPAddress address, byte[] buffer, int timeout, PingOptions options)
        {
            try
            {
                Task<PingReply> t = RawSocketPermissions.CanUseRawSockets(address.AddressFamily) ?
                    SendIcmpEchoRequestOverRawSocket(address, buffer, timeout, options) :
                    SendWithPingUtility(address, buffer, timeout, options);
                PingReply reply = await t.ConfigureAwait(false);
                if (_canceled)
                {
                    throw new OperationCanceledException();
                }
                return reply;
            }
            finally
            {
                Finish();
            }
        }