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

◆ SendEcho()

int System.Net.NetworkInformation.Ping.SendEcho ( IPAddress address,
byte[] buffer,
int timeout,
PingOptions options,
bool isAsync )
inlineprivate

Definition at line 563 of file Ping.cs.

564 {
565 global::Interop.IpHlpApi.IPOptions options2 = new global::Interop.IpHlpApi.IPOptions(options);
566 if (!_ipv6)
567 {
568 return (int)global::Interop.IpHlpApi.IcmpSendEcho2(_handlePingV4, GetWaitHandle(isAsync), IntPtr.Zero, IntPtr.Zero, (uint)address.Address, _requestBuffer, (ushort)buffer.Length, ref options2, _replyBuffer, 65791u, (uint)timeout);
569 }
570 IPEndPoint endpoint = new IPEndPoint(address, 0);
572 byte[] sourceSocketAddress = new byte[28];
573 return (int)global::Interop.IpHlpApi.Icmp6SendEcho2(_handlePingV6, GetWaitHandle(isAsync), IntPtr.Zero, IntPtr.Zero, sourceSocketAddress, socketAddress.Buffer, _requestBuffer, (ushort)buffer.Length, ref options2, _replyBuffer, 65791u, (uint)timeout);
574 }
SafeWaitHandle GetWaitHandle(bool async)
Definition Ping.cs:532
SafeLocalAllocHandle _replyBuffer
Definition Ping.cs:37
global::Interop.IpHlpApi.SafeCloseIcmpHandle _handlePingV6
Definition Ping.cs:41
SafeLocalAllocHandle _requestBuffer
Definition Ping.cs:35
global::Interop.IpHlpApi.SafeCloseIcmpHandle _handlePingV4
Definition Ping.cs:39
static System.Net.Internals.SocketAddress Serialize(EndPoint endpoint)

References System.Net.NetworkInformation.Ping._handlePingV4, System.Net.NetworkInformation.Ping._handlePingV6, System.Net.NetworkInformation.Ping._ipv6, System.Net.NetworkInformation.Ping._replyBuffer, System.Net.NetworkInformation.Ping._requestBuffer, System.Net.IPAddress.Address, System.Net.Internals.SocketAddress.Buffer, System.buffer, System.Net.NetworkInformation.Ping.GetWaitHandle(), System.options, System.Net.Sockets.IPEndPointExtensions.Serialize(), System.timeout, and System.IntPtr.Zero.

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