AddressFamily.InterNetwork : AddressFamily « System.Net.Sockets « VB.Net by API






AddressFamily.InterNetwork

  


Imports System.Net.Sockets
Imports System.Net
Imports System.Threading


Public Class Tester
    Dim Shared mySocket As Socket
    Public Shared Sub Main
        Dim myThread As New Thread(New ThreadStart(AddressOf StartConnection))
        myThread.Start()


    End Sub
    Private Shared Sub StartConnection()
        Try
            mySocket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)

            mySocket.Connect(New IPEndPoint(IPAddress.Parse("192.168.1.100"), 12335))
        Catch ex As SocketException
            Console.WriteLine(ex.Message)
        End Try
    End Sub
    
End Class

   
    
  








Related examples in the same category