|
-
Feb 1st, 2010, 06:27 AM
#1
Thread Starter
Addicted Member
winsock data arrival
I made a program that communicate with some electronic device using winsock udp protocol, i am trying to write a function that will tell me rather or not a device is online by looking at if anything is sent back from the device.
this is my function
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
Winsock1.GetData strData, vbString, bytesTotal
If Not Len(strData) = 0 Then
online = 1
End If
End Sub
i declared the variable "online" as a global variable, but somehow "online" is always 0...i think i am trying to do this the wrong way, can anyone give me a hand?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|