'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(socket As Socket, Serv As Tcserver)
ClientCMdList.Initialize
SendTimerQueue.Initialize("SendTimerQueue", 1000)
Aserver = Serv
astream.Initialize(Me, "AStream", socket.InputStream, socket.OutputStream)
End Sub
Sub SendTimerQueue_tick
If ClientCMdList.IsInitialized Then
If ClientCMdList.Size > 0 Then
If SendingQueue = True Then
Return
End If
SendingQueue = True
For i = ClientCMdList.Size -1 To 0 Step -1
Dim Cmdstr As String
Cmdstr = ClientCMdList.Get(i)
astream.Write(Cmdstr)
ClientCMdList.RemoveAt(i)
Next
SendingQueue = False
End If
End If
End Sub