How to use SysSockselect to detect the readable socket in SOCKET_FD_SET

fox-fox
2020-09-18
2020-09-18
  • fox-fox - 2020-09-18

    1.SysSockCreate
    2.SysSockBind
    3.SysSockListen
    4. After completing the above 3 steps, use SysSockAccept to receive the client socket.
    5. Push the received multiple client sockets into a SOCKET_FD_SET structure

    How can I know which socket has data coming in?
    The following is my test code, I found that SysSockselect can only detect SOCKET_FD_SET.fd_array[0].

    Suppose I save the second TCPSocket into SOCKET_FD_SET.fd_array[1]. When data comes, SysSockselect cannot detect it.

     

    Related

    Talk.ru: 1

  • fox-fox - 2020-09-18

    HELP!
    THANKS!!!

     

    Last edit: fox-fox 2020-09-18

Log in to post a comment.