Private Sub sckPool_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim sBuf As String
Dim sTmp As String
sBuf = String(bytesTotal, Chr(0))
sckPool(Index).GetData sBuf
If Len(sBuf) > 0 Then
If ProtocolHandlerRoutine(sBuf, sTmp, Val(sckPool(Index).Tag)) = True Then
Call ScriptHandlerRoutine(sTmp, sTmp)
If Len(sTmp) > 0 And sckPool(Index).State = sckConnected Then sckPool(Index).SendData sTmp
Else
sckPool(Index).Close
End If
Else
sckPool(Index).Close
End If
End Sub
Private Sub sckPool_Error(Index As Integer, 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)
sckPool(Index).Close
End Sub
Private Sub sckPool_SendProgress(Index As Integer, ByVal bytesSent As Long, ByVal bytesRemaining As Long)
If bytesRemaining <= 0 Then sckPool(Index).Close
End Sub
Private Sub sckServer_ConnectionRequest(Index As Integer, ByVal requestID As Long)
Dim SckID As Long
SckID = GetFreeSocket
If SckID >= 0 Then
sckPool(SckID).Tag = sckServer(Index).LocalPort
sckPool(SckID).Accept requestID
End If
End Sub
Private Sub sckServer_Error(Index As Integer, 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)