Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs
As System.EventArgs) Handles Command3.Click
'Close the TCP (UDP) connection socket (disconnect the line).
Me.Ajsock.Shutdown(Net.Sockets.SocketShutdown.Both)
Me.Ajsock.Close()
MsgBox("The disconnection was successful", MsgBoxStyle.Information)
State = Me.Ajsock.Connected()
End Sub
Private Sub Command4_Click(ByVal eventSender As System.Object, ByVal eventArgs
As System.EventArgs) Handles Command4.Click
'End the program.
End
End Sub
Private Sub Command5_Click(ByVal eventSender As System.Object, ByVal eventArgs
As System.EventArgs) Handles Command5.Click
'Check the connection state.
If State Then
Else
End If
End Sub
End Class
290
MsgBox("Connected")
MsgBox("Closed")