IPEndPoint.Create creates an endpoint from a socket address. : IP Address « Network Remote « VB.Net






IPEndPoint.Create creates an endpoint from a socket address.

 

Imports System.IO
Imports System.Net
Imports System.Text

Public Class MainClass
    Shared Sub Main()
        Dim endpoint As New IPEndPoint(0, 0)

        Dim socketAddress As SocketAddress = endpoint.Serialize()
        Dim clonedIPEndPoint As IPEndPoint = CType(endpoint.Create(SocketAddress), IPEndPoint)
        Console.WriteLine(("clonedIPEndPoint: " + clonedIPEndPoint.ToString()))
    End Sub
End Class

   
  








Related examples in the same category

1.Get your IP address
2.IPAddress.Address
3.IPAddress.Broadcast Field provides the IP broadcast address. This field is read-only.
4.IPAddress.Loopback
5.IPAddress.None indicates that no network interface should be used. This field is read-only.
6.IPAddress.Parse converts an IP address string to an IPAddress instance.
7.Create IPEndPoint class with the specified address and port number.
8.Serializes endpoint information into a SocketAddress instance.