M
M
mIka012021-09-26 18:17:01
Socket.io
mIka01, 2021-09-26 18:17:01

Socket access interrupts, how to implement?

Hello, I am writing a sea battle lab.
According to T.Z. from the teacher to transfer information, I can only use the socket. Accordingly, to receive information, I can use only this line . When this line is called, it hangs until the message on the socket passes. How can I make it run in parallel or only be called when the information passes? recv(Connection, msg, sizeof(msg), NULL);

I asked the teacher about threads and he said that they cannot be used, but timer1_Tick can be used. I tried to stupidly hang this command there, but everything hangs again.


Help me please.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question