Yoann Vandoorselaere wrote:
>             r = recv (pfd[i].fd, data, sizeof (data), MSG_PEEK);
> +            
> +# ifdef WIN32
> +           if (r < 0 && GetLastError() == 10057) /* server socket */
> +              socket_errno = ENOTCONN;
> +           else
> +# endif

I thought that after using a winsock function, you need to check
WSAGetLastError() and not GetLastError()? [1]

Also, is there no symbolic, self-explanatory name instead of 10057?

Bruno

[1] http://msdn.microsoft.com/en-us/library/ms740121(VS.85).aspx



Reply via email to