Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' this is also treated like a message proc, it's registered in it's own windowclass as well
- Public Function MessageProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
- ' variable declares not shown, this is an example of the code action
- If ServerToClientTop <> ServerToClientBottom Then
- Do Until ServerToClientBottom = ServerToClientTop
- SendData socketClient, ServerToClientBuffer(ServerToClientBottom)
- ServerToClientBuffer(ServerToClientBottom) = ""
- ServerToClientBottom = ServerToClientBottom + 1
- If ServerToClientBottom > SERVERMAX Then ServerToClientBottom = 0
- Loop
- End If
- If ClientToServerTop <> ClientToServerBottom Then
- Do Until ClientToServerBottom = ClientToServerTop
- SendData socketServer, ClientToServerBuffer(ClientToServerBottom)
- ClientToServerBuffer(ClientToServerBottom) = ""
- ClientToServerBottom = ClientToServerBottom + 1
- If ClientToServerBottom > CLIENTMAX Then ClientToServerBottom = 0
- Loop
- End If
- ' note that unless we're processing one of our messages, you MUST call DefWindowProc
- MessageProc = DefWindowProc(hwnd, uMsg, wParam, lParam)
- End Function
- ' this is an example of how to interrupt the connection, if you need to process messages
- ' maintain proper data flow between the server and the client
Advertisement
Add Comment
Please, Sign In to add comment