src/Cassandra/Utils.cs
/// <summary>
/// Performs a getnameinfo() call and returns the primary host name
/// </summary>
Performs a getnameinfo() call and returns the primary host name
Performs a getnameinfo () call and returns the primary host name
public static string GetPrimaryHostNameInfo(string address)
        {
#if !NETCORE
            var hostEntry = Dns.GetHostEntry(address);
#else
            var hostEntryTask = Dns.GetHostEntryAsync(address);
            hostEntryTask.Wait();
            var hostEntry = hostEntryTask.Result;
#endif
            return hostEntry.HostName;
        }
public static string GetPrimaryHostNameInfo ( string address ) { if ! NETCORE var hostEntry = Dns . GetHostEntry ( address ) ; else var hostEntryTask = Dns . GetHostEntryAsync ( address ) ; hostEntryTask . Wait ( ) ; var hostEntry = hostEntryTask . Result ; endif return hostEntry . HostName ; }
Performs a getnameinfo() call and returns the primary host name
Performs a getnameinfo () call and returns the primary host name
address
string