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,

CodePudding user response:

reference 1st floor cfjtaishan response:
sticking is caused by obstruction, should be the end of the data is not received, or the server is not sent successfully,
but I have been sent in the server Settings' OK ', not not received? https://www.oschina.net/question/3396739_2239211 code in the link

CodePudding user response:

refer to the second floor kenzhenzha1570 response:
Quote: refer to 1st floor cfjtaishan response:

Sticking is caused by obstruction, should be the end of the data is not received, or the server is not sent successfully,
but I have been sent in the server Settings' OK ', not not received? https://www.oschina.net/question/3396739_2239211 code in the link

The first thing you must first determine whether the server to send a success?
  • Related