int TimeOut, valsize;
setsockopt(skt,SOL_SOCKET,SO_RCVTIMEO,(const char *)&TimeOut,valsize);
firstly i make the call with TimeOut = 1000 and valsize = sizeof(TimeOut), then i make it with TimeOut = 0 and valsize=0
the first call ends up sucessfully but the second one doesnt
it gives an erorr of WSAEFAULT
(the description of error from MSDN
optval is not in a valid part of the process address space or optlen parameter is too small
optval=TimeOut, optlen = valsize
anyone who can help??