Originally posted by etoo


If I start the server first and then the client, it works.

But, if I start the client first, it does not get the data.

Likewise, if I exit the server and then reload it, the client does not get the data.

Why is this?

Thanks!
perhaps the reason for it not working after reload is the winsock wasn't closed? Make the code close the winsock on connection if it is not used anymore something like this:

VB Code:
  1. Private Sub Winsock1_ConnectionRequest(Index As Integer, ByVal requestID As Long)
  2.  
  3. If Winsock1(Index).State <> sckClosed Then
  4.         Winsock1(Index).Close
  5. End If
  6. 'plus all other connection code
  7. End Sub