C# Класс NetworkCommsDotNet.Tools.IPTools

A collection of tools for dealing with IP addresses.
Показать файл Открыть проект

Открытые методы

Метод Описание
BestLocalEndPoint ( IPEndPoint remoteIPEndPoint ) : IPEndPoint

Determines the most appropriate local end point to contact the provided remote end point. Testing shows this method takes on average 1.6ms to return.

GetIPv4NetworkBroadcastAddress ( IPAddress localIPAddress ) : IPAddress

Returns the network broadcast address for the provided local IP address

ParseEndPointFromString ( string ipAddressAndPort ) : IPEndPoint

Converts an IPAddress in string form (IPv4 or IPv6) with an appended port number, e.g. 192.168.0.10:10000 or ::1:10000, into an System.Net.IPEndPoint.

Приватные методы

Метод Описание
AttemptBestIPAddressGuess ( IPAddress targetIPAddress ) : IPAddress
GetBestInterface ( UInt32 DestAddr, UInt32 &BestIfIndex ) : int

Описание методов

BestLocalEndPoint() публичный статический Метод

Determines the most appropriate local end point to contact the provided remote end point. Testing shows this method takes on average 1.6ms to return.
public static BestLocalEndPoint ( IPEndPoint remoteIPEndPoint ) : IPEndPoint
remoteIPEndPoint IPEndPoint The remote end point
Результат IPEndPoint

GetIPv4NetworkBroadcastAddress() публичный статический Метод

Returns the network broadcast address for the provided local IP address
public static GetIPv4NetworkBroadcastAddress ( IPAddress localIPAddress ) : IPAddress
localIPAddress IPAddress
Результат IPAddress

ParseEndPointFromString() публичный статический Метод

Converts an IPAddress in string form (IPv4 or IPv6) with an appended port number, e.g. 192.168.0.10:10000 or ::1:10000, into an System.Net.IPEndPoint.
public static ParseEndPointFromString ( string ipAddressAndPort ) : IPEndPoint
ipAddressAndPort string The IP and Port to be parsed
Результат IPEndPoint