Click or drag to resize

NetHelper Class

Useful network related utilities.
Inheritance Hierarchy
SystemObject
  Neon.NetNetHelper

Namespace:  Neon.Net
Assembly:  Neon.Common (in Neon.Common.dll) Version: 2.1.0
Syntax
public static class NetHelper

The NetHelper type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberDnsHostRegex
Regex for verifying DNS hostnames.
Top
Methods
  NameDescription
Public methodStatic memberAddressEquals
Determines whether two IP addresses are equal.
Public methodStatic memberAddressIncrement
Increments an IPv4 address by adding an integer value.
Public methodStatic memberAddressToUint
Converts an IPv4 address into a32-bit unsigned integer equivalent.
Public methodStatic memberComputeMSS
Computes the TCP maximum segment size for a given MTU, optionally taking a VXLAN wrapper headers into account.
Public methodStatic memberGetReachableHost
Pings one or more hostnames or IP addresses in parallel to identify one that appears to be online and reachable via the network (because it answers a ping).
Public methodStatic memberGetReachableHosts
Pings one or more hostnames or IP addresses in parallel to identify those that appear to be online and reachable via the network (because it answers a ping).
Public methodStatic memberGetRoutableIpAddress
Returns a routable (non-loopback) IPv4 address for the current machine.
Public methodStatic memberGetUnusedTcpPort
Returns a free TCP port for a local IP address.
Public methodStatic memberIsValidHost
Verifies that a string is a valid DNS hostname.
Public methodStatic memberIsValidPort
Determines whether an integer is a valid network port number.
Public methodStatic memberListLocalHostsSections
Lists the names of the local host sections.
Public methodStatic memberModifyLocalHosts

Used to temporarily modify the hosts file used by the DNS resolver for debugging or other purposes.

Note Note
WARNING: Modifying the hosts file will impact all processes on the system, not just the current one and this is designed to be used by a single process at a time.
Public methodStatic memberParseIPv4Endpoint
Parses an IPv4 endpoint from a string.
Public methodStatic memberTryParseIPv4Endpoint
Attempts to parse an IPv4 network endpoint.
Public methodStatic memberUintToAddress
Converts an unsigned 32-bit integer into an IPv4 address.
Top
See Also