On Feb 12, 10:33 am, Spam Catcher <spamhoney...@rogers.comwrote:
"Deepak" <deepak.m...@gmail.comwrote in news:1171258144.907950.54910
@l53g2000cwa.googlegroups.com:
no i dont want to block it . the ping completed function runs by
itself after some time.
i want to make it wait until the ping completed function runs and then
continue pinging another center.
If you want to make Ping "wait" then you're block the thread?
Do you want or do you want to
ping the centers one at a time
Sorry to reply late ,
ping the centers one at a time (single threaded - blocking?). as u
say. I don't know much about threading
here are the functions used
1 ) the ping completed one
Private Sub pingClient_PingCompleted( ByVal sender As Object,
ByVal e As PingCompletedEventArgs) _
Handles pingClient.PingCompleted
' Check to see if an error occurred. If no error, then
display the
' address used and the ping time in milliseconds
2 ) Private Sub sendPingButton_Click( ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
sendPingButton.Click
'it contains a loop with this command
pingClient.SendAsync(address1.Text, Nothing)
there are many text boxes (address2, address3,etc)
Now when the loop starts the first address is pinged . before the ping
completed is called for the first address the second address gets
pinged
I want it to wait till the ping completed function gets called and
then ping the second address.