A application connects to a server. Then the server sends the application some data. Once the data has been received and verified then the application can continue on with normal processing.
If I set up a wait loop it doesn't work, like this:
The connection is made. I know that for sure.
The DataArrival event is never fired so I can't set the WaitOnServer indicator to False
If I remove the loop it works but then it's too soon to continue processing since the app continues on without the data it needs from the server
If I set up a wait loop it doesn't work, like this:
Code:
'
'
SocketForServer.Close
SocketForServer.Connect "localhost", 1370
WaitOnServer = True
Do While WaitOnServer
DoEvents
Loop
'
'
The DataArrival event is never fired so I can't set the WaitOnServer indicator to False
If I remove the loop it works but then it's too soon to continue processing since the app continues on without the data it needs from the server