CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Location
    Bangladesh
    Posts
    38

    select(), how do I know which socket got the notification

    When select() returns how do I know which kind of notification has occured (readfds, writefds or exceptfds). In addtion which particular socket in the fdset array got the notification. Do I have to loop through all the sockets and check if data has arrived or data can be send?

    Thanks

  2. #2
    Join Date
    Dec 2002
    Location
    St.Louis MO, USA
    Posts
    672
    I Think you can call FD_ISSET macro to check all set of sockets for readability,writeability or errors , I mean if you r checking writeability then you check each socket one by one in a loop with FD_ISSET macro or if your r checking all options then you should check each fd_set array used in select function one by one.
    A Person who is polite is given goodness and a person who is away from Politeness is away from Goodness.

    NAUMAAN

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured