Public Class Form1
Dim clientSocket As New System.Net.Sockets.TcpClient()
Dim n As Integer
Dim ip As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
n = 0
ListBox1.SelectedIndex = n
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
ListBox2.Items.Add("Clicking has started! Selecting google.com")
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ip = ListBox1.SelectedItem
clientSocket.Connect(ip, 80)
ListBox2.Items.Add("Connected to: " & ListBox1.SelectedItem & " Port: 80")
Process.Start(http://www.google.com)
ListBox2.Items.Add("Opened page: google.com")
n += 1
ListBox1.SelectedIndex = n
clientSocket.Client.Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ListBox2.Items.Add("Stopped Clicking!")
End Sub
So it just says to: clientSocket.Connect(ip, 80)
However, it gets an error after it finishes clicking the first one. When it goes to change to the second one and click it, it gives me an error saying that you cannot have 2 connections open at once. So I tried..
clientSocket.EndConnect()- this gives me an error: Error 1 Argument not specified for parameter 'asyncResult' of 'Public Sub EndConnect(asyncResult As System.IAsyncResult)'.
What do I do to fix this error? What is it looking for inside the ()'s of the .EndConnect feature?
~Thanks for any of the help!!
This post has been edited by chiefofgxbxl: 29 July 2009 - 10:22 AM

New Topic/Question
Reply



MultiQuote







|