Home > Net > C # socket. The problem of the Receive always delay for a few seconds
C # socket. The problem of the Receive always delay for a few seconds
Time:09-27
Start socket listening news letter from a third party, regardless of the packet size, even if it is only 10 byte, socket. The Receive to wait after N seconds to finish
For example code
Console. WriteLine (" is ready to receive data "); Clientsocket. The Receive (bytes); - & gt; Here always need to fixed N seconds, regardless of the packet size Console. WriteLine (" receiving data ");
Have to know what's going on?
CodePudding user response:
If excluding network, you are blocking worker threads in other places