Thread: Running two UDP server simultaneously using select()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,667
    > When putting the FD_SET macros in the do-while loop everything works like it should.
    Yes, select() is allowed to update the fd_set's (in order to tell you which fd's are ready).

    Rather than using FD_SET all the time, you can create a 'master' set using FD_SET, then copy them all at once to a working set using FD_COPY.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #2
    Registered User
    Join Date
    Jan 2008
    Posts
    9
    OK, that means putting the FD_COPY in the loop after creating the fileset before, correct?.

    One question to that, does the macro FD_COPY work under windows, too?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problems with linux UDP server
    By Lopizda in forum Networking/Device Communication
    Replies: 5
    Last Post: 04-26-2007, 08:42 AM
  2. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM