TCP does not send / receive some data

I am writing to the server and the client, but during testing I found an unpleasant thing, such that at some point I get stuck in communication between the client and the server. Sometimes it happens right after the first pair of messages, sometimes later. No error is thrown anywhere, only the server sends the message and does not reach the client.
Unfinished codes:
Sometimes this happens with a message on line 113 at the server, and 57 at the client; sometimes also for the message “ok” after sending the public key that arrives at the server, that is on line 59 at the server and 64 at the client.
How can I fix it and where is the error?
I also apologize for my English, I’m just learning it :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.