Home > other > About the socket of the recv () questions
About the socket of the recv () questions
Time:10-07
In the socket communication, I set the server has been sent 'OK', in the client data=https://bbs.csdn.net/topics/tcpCliSock.recv (bufsize), but it stuck, checked on the Internet, should be the recv () into the blocked, surfing the Internet and checked about the recv () blocking and non-blocking, now there are two problems is not very good: 1, in the socket communication, must be in accordance with the first sending, receiving pattern again? Can't directly receive? 2, I try to use the. Setblocking (0) to non obstructive recv (), showed [10035] WinError can't do a non stop immediately socket operation, I have a small white, know a great god some directions
CodePudding user response:
Sticking is caused by obstruction, should be the end of the data is not received, or the server is not sent successfully,