MeGaLoDoN
MeGaLoDoN
CC#
Created by MeGaLoDoN on 2/3/2024 in #help
I need help debugging c# event-based reliable UDP implementation.
Note: I know that there are libraries that can do this and even more. But for my own reasons, I want to have full control of my code, and it is already almost done and supposed to work, I just have 1 bug. Here is code: https://pastebin.com/dXx6WPG9 Basically, OnConnectionRequest gets called correctly on the server. Then I call request.Accept, but client never receives a response and connection result is false, so OnConnected never gets called. This is not only with accept message - I tried sending a lot different messages from server to client, but client never receives any message, although server always receives messages from the client. The client is always stuck on: var msg = await _client.ReceiveAsync(token); in CheckForMessages.
14 replies