Aracılığıyla paylaş


IPEndPoint.MaxPort Alan

Tanım

Özelliğine atanabilecek Port en büyük değeri belirtir. MaxPort değeri 0x0000FFFF olarak ayarlanır. Bu alan salt okunurdur.

public: int MaxPort = 65535;
public const int MaxPort = 65535;
val mutable MaxPort : int
Public Const MaxPort As Integer  = 65535

Alan Değeri

Value = 65535

Örnekler

Aşağıdaki örnek özelliğine MaxPort atanabilecek en büyük değeri yazdırmak için Port özelliğini kullanır.


IPAddress hostIPAddress1 = (Dns.Resolve(hostString1)).AddressList[0];
Console.WriteLine(hostIPAddress1.ToString());
IPEndPoint hostIPEndPoint = new IPEndPoint(hostIPAddress1,80);
Console.WriteLine("\nIPEndPoint information:" + hostIPEndPoint.ToString());
Console.WriteLine("\n\tMaximum allowed Port Address :" + IPEndPoint.MaxPort);
Console.WriteLine("\n\tMinimum allowed Port Address :" + IPEndPoint.MinPort);
Console.WriteLine("\n\tAddress Family :" + hostIPEndPoint.AddressFamily);
Dim hostIPAddress1 As IPAddress = Dns.Resolve(hostString1).AddressList(0)
Dim hostIPEndPoint As New IPEndPoint(hostIPAddress1, 80)
Console.WriteLine((ControlChars.Cr + "IPEndPoint information:" + hostIPEndPoint.ToString()))
Console.WriteLine((ControlChars.Cr + ControlChars.Tab + "Maximum allowed Port Address :" + IPEndPoint.MaxPort.ToString()))
Console.WriteLine((ControlChars.Cr + ControlChars.Tab + "Minimum allowed Port Address :" + IPEndPoint.MinPort.ToString()))
Console.WriteLine((ControlChars.Cr + ControlChars.Tab + "Address Family :" + hostIPEndPoint.AddressFamily.ToString()))

Şunlara uygulanır