Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. select() in conjunction with recvfrom()

select() in conjunction with recvfrom()

Scheduled Pinned Locked Moved C / C++ / MFC
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    esepich
    wrote on last edited by
    #1

    I am a little confused about how exactly these two functions can work with each other. I would like to make a call to select and then make a call to recvfrom() so as to allow for a timeout period. So if my socket does not recvfrom() anything within lets say four seconds then I need to send a "timed out" error to the output box. I have read the msdn reference on select() but I don't really understand. Thank you, Eric Sepich

    M 1 Reply Last reply
    0
    • E esepich

      I am a little confused about how exactly these two functions can work with each other. I would like to make a call to select and then make a call to recvfrom() so as to allow for a timeout period. So if my socket does not recvfrom() anything within lets say four seconds then I need to send a "timed out" error to the output box. I have read the msdn reference on select() but I don't really understand. Thank you, Eric Sepich

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      The best resource I can give you is the Winsock Programmer's FAQ[^]. select tells you when there is data waiting to be read from a socket, or when data can be written to a socket, or when a socket is in an error state.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups