Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' the two message pumps and definations:
- Private Const CLIENTMAX = 50
- Private ClientToServerBuffer(CLIENTMAX) As String
- Public ClientToServerTop As Long
- Public ClientToServerBottom As Long
- Public Sub ClientMessageToServer(sMsg As String)
- ' the FIFO pump for the client
- ' If DumpDebugC Then Put #DumpDebugC, , sMsg
- ClientToServerBuffer(ClientToServerTop) = sMsg
- ClientToServerTop = ClientToServerTop + 1
- If ClientToServerTop > CLIENTMAX Then ClientToServerTop = 0
- PostMessage hMessageProc, WM_COMMAND, UM_PUMPCLIENT, 0
- End Sub
- ' note that the server to client buffer is bigger to handle large amounts of data
- Private Const SERVERMAX = 199
- Private ServerToClientBuffer(SERVERMAX) As String
- Public ServerToClientTop As Long
- Public ServerToClientBottom As Long
- Public Sub ServerMessageToClient(sMsg As String)
- ' the FIFO pump for the server
- If DumpDebugB Then
- Put #DumpDebugB, , sMsg
- ' Debug.Print sMsg
- End If
- ServerToClientBuffer(ServerToClientTop) = sMsg
- ServerToClientTop = ServerToClientTop + 1
- If ServerToClientTop > SERVERMAX Then ServerToClientTop = 0
- PostMessage hMessageProc, WM_COMMAND, UM_PUMPSERVER, 0
- proxy.MainStatus.Panels(pToDo).Text = ServerToClientTop
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment