Windows Socket Timeout

Evan Davis cptroot at gmail.com
Thu Mar 22 14:09:30 PDT 2012


Hi, I'm trying to write a game sever/client architecture in D, 
but I keep running into problems with the timeouts for windows 
sockets.

On the std.socket documentation page it states that you can't set 
a timeout smaller than 500ms, and I've been experiencing this 
problem first hand. The problem is that I am trying to interlace 
sending packets with receiving packets, and I can't do that at 60 
FPS without having a low timeout.

Two questions: First, can you use select() on UDP sockets?

Second, would it be feasible to have two different sockets 
instead, and use the REUSEADDR option? I'm somewhat worried about 
client-side cheating.

Thanks for any thoughts,
  Evan Davis


More information about the Digitalmars-d mailing list