Simple Winsock Problem 
Author Message
 Simple Winsock Problem

I am trying to write a simple Ping program with VB 6.0 Pro.
I have made an assumption that I should be using UDP rather
than TCP.  Maybe I've already made a wrong turn...

I have a form with the Winsock control and a single button on it.
Here's the code I hoped would work.  204.71.177.35 is a valid
address that I can ping with the W95 Ping program.  When I click
the Ping button on the form to execute this first section of code,
nothing comes back (the _DataArrival routine is never triggered).
This seems like a simple problem to me.  Any help or ideas would
be greatly appreciated.

Dave

Private Sub cmdPing_Click()
    With udpControl
        .RemoteHost = "204.71.177.35"
        .RemotePort = 80   ' Port to connect to. 1001?
        .Bind 1001
        .SendData "testing, 1, 2, 3..."
    End With
End Sub

Private Sub udpControl_DataArrival _
(ByVal bytesTotal As Long)
    Dim strData As String
    udpControl.GetData strData
    MsgBox strData
End Sub

--
Dave Grimmer
Ohio Star Software



Tue, 27 Mar 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Simple WINSOCK Problem

2. Simple Winsock Problem

3. Simple Winsock Problem

4. A simple Mail problem in search for a equally simple answer

5. winsock problem sending large strings (winsock.senddata)

6. Simple question about Winsock?

7. simple chat winsock+wscript.run(rundll)

8. Simple Catalyst Winsock query

9. oe simple help whit winsock

10. Simple Winsock question

11. help! simple chat with winsock

12. Help Using Winsock as a simple Web Server......

 

 
Powered by phpBB® Forum Software