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

◆ GetHostName()

static string System.Net.Dns.GetHostName ( )
inlinestatic

Definition at line 16 of file Dns.cs.

17 {
18 ValueStopwatch stopwatch = NameResolutionTelemetry.Log.BeforeResolution(string.Empty);
19 string hostName;
20 try
21 {
22 hostName = NameResolutionPal.GetHostName();
23 }
25 {
26 throw;
27 }
28 NameResolutionTelemetry.Log.AfterResolution(stopwatch, successful: true);
29 if (System.Net.NetEventSource.Log.IsEnabled())
30 {
31 System.Net.NetEventSource.Info(null, hostName, "GetHostName");
32 }
33 return hostName;
34 }
static bool LogFailure(ValueStopwatch stopwatch)
Definition Dns.cs:599
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)

References System.Net.NameResolutionPal.GetHostName(), System.Net.NetEventSource.Info(), System.Net.NetEventSource.Log, System.Net.NameResolutionTelemetry.Log, and System.Net.Dns.LogFailure().

Referenced by Terraria.Netplay.BroadcastThread(), Terraria.Netplay.GetLocalIPAddress(), and System.Net.WebProxy.IsLocal().