Home > other >  On the select the return value of 1 (the error is always equal to 10022).
On the select the return value of 1 (the error is always equal to 10022).

Time:09-30

Over a section of code, select teaching online code in the main structure is the main write an infinite loop call accept (), and then create a WorkThread () used to invoke the select ()
After the start process, without any connection, select always return 1, the error is 10022
Online a lot, no explanation,

Myself to turn over the ACE of the source code, find somebody else will be able to return to the correct value (0), and then found he select fd_set parameters has a socket, and the socket after the query is the socket used to accept, that is: listen socket,

Someone know this problem? Why to be like this? Wrote the select friends, how do you write?

CodePudding user response:

Refer to the foreigners write an instance, they are adding listening socket fd set, and then detect the read for users to connect,
I have understood, this post is gone,
  • Related