HOWTO: Configure a Time-Out on a CSocket Operation
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q138/6/92.asp&NoWebContent=1
msdn里面写着
Berkeley Software Distribution (BSD) options not supported for SetSockOpt are:
Value Type Meaning
SO_ACCEPTCONN BOOL Socket is listening
SO_ERROR int Get error status and clear.
SO_RCVLOWAT int Receive low water mark.
SO_RCVTIMEO int Receive timeout
SO_SNDLOWAT int Send low water mark.
SO_SNDTIMEO int Send timeout.
SO_TYPE int Type of the socket.
IP_OPTIONS Set options field in IP header
我的程序都写完了才发现无法家超时,愁死我了。