Advertisement

WSAEFAULT error on accept()

Started by January 19, 2004 01:17 PM
1 comment, last by Woodsman 21 years ago
I'm working my way through Network Programming for Windows Second Edition and the very first complete example seems to be failing on my when I run it. The TCP server gives me: "accept failed with error 10014" I've taken 10014 to be WSAEFAULT from the definitions in winsock2.h but can't seem to find anything useful on it in either the book or MSDN. Is there something wrong with the following code? This doesn't seem to make sense. Thanks much in advance. EDIT: removed code as it is from the book [edited by - woodsman on January 19, 2004 2:51:59 PM]
If a plant cannot live according to its nature, it dies; so a man.
Try initializing ClientAddrLen with the size of ClientAddr.
Advertisement
Fantastic! I had just come across that myself, I''m surprised that was forgotten by the author. Anyway, thanks a lot for the quick response.
If a plant cannot live according to its nature, it dies; so a man.

This topic is closed to new replies.

Advertisement