I would like to know how to loop a connection or close an existing connection. heres the code i have to connect
Imports System.Net.Sockets
Public Class Form1
Dim clientSocket As New System.Net.Sockets.TcpClient()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
clientSocket.Connect("ServerIp Goes Here", Server port goes here Catch ex As Exception
Me.Close()
End Try
End Sub