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

◆ InitialiseIcmpHandle()

void System.Net.NetworkInformation.Ping.InitialiseIcmpHandle ( )
inlineprivate

Definition at line 541 of file Ping.cs.

542 {
543 if (!_ipv6 && _handlePingV4 == null)
544 {
545 _handlePingV4 = global::Interop.IpHlpApi.IcmpCreateFile();
546 if (_handlePingV4.IsInvalid)
547 {
548 _handlePingV4 = null;
549 throw new Win32Exception();
550 }
551 }
552 else if (_ipv6 && _handlePingV6 == null)
553 {
554 _handlePingV6 = global::Interop.IpHlpApi.Icmp6CreateFile();
555 if (_handlePingV6.IsInvalid)
556 {
557 _handlePingV6 = null;
558 throw new Win32Exception();
559 }
560 }
561 }
global::Interop.IpHlpApi.SafeCloseIcmpHandle _handlePingV6
Definition Ping.cs:41
global::Interop.IpHlpApi.SafeCloseIcmpHandle _handlePingV4
Definition Ping.cs:39

References System.Net.NetworkInformation.Ping._handlePingV4, System.Net.NetworkInformation.Ping._handlePingV6, and System.Net.NetworkInformation.Ping._ipv6.

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