I have a simple need for a winsock. The program sends a message to a user, and the users machine processes it, not big thing. Problem is the first message goes through without a problem, but when I try to send additional messages, the machine that should do the receiving stops listening. Any help would be appreciated.
Problem: Sends on message fine, but then it stops working.
I've Tested: Sending machine does loop through address, but always stays at state 6 which is connecting, it never connects. Receiving machine' winsock1_connectionRequest never gets triggered. And the state of winsock1 doesn't go back to listening (2)

Any assistance would be greatly appreciated.

Here's the code for the machine that would do the listening:

'form_load calls init winsock to setup inital settings
Private Sub InitWinsock()
Winsock1.LocalPort = 1008
Winsock1.Listen
Debug.Print Winsock1.state & "init"
End Sub


Private Sub Winsock1_Close()
Debug.Print "winsock closing" & vbCrLf
End Sub

Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
On Error GoTo log_err
If Winsock1.state <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
Debug.Print Winsock1.state & vbCrLf
Exit Sub
log_err:
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strdata As String
On Error GoTo log_err
Winsock1.GetData strdata, vbString
ProccessData strdata
Debug.Print "dataarrived" & strdata & vbCrLf
Debug.Print Winsock1.state
Exit Sub
log_err:
End Sub


Here's the code for sending:


Public Sub AnnounceToNetwork(thedata As String)
Dim i As Integer
Dim x As Long

For i = 0 To UBound(SUPERIPS) 'superips hold a list if ipaddress
Do While Not CloseConnect ' wait for data to be sent before
closing
DoEvents: DoEvents: DoEvents: DoEvents
Loop
winsock.Close
winsock.RemoteHost = SUPERIPS(i)
winsock.RemotePort = 1008
winsock.Connect
Do Until winsock.state = sckConnected Or x > 1000
'only want to try for a short amout of time to connect
x = x + 1
DoEvents: DoEvents: DoEvents: DoEvents
Loop
If winsock.state = sckConnected Then 'send if connected
CloseConnect = False
thedata = thedata & "|" & GetXtension(winsock.LocalHostName) & "|" & Time$
winsock.SendData thedata
End If
x = 0
Next
End Sub

Private Sub winsock_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)

CloseConnect = True

End Sub

Private Sub winsock_SendComplete()
CloseConnect = True
winsock.Close
End Sub