Discussion:
Winsock Error 10014 - WSAEFAULT (Bad Address)
(too old to reply)
Daniel
2004-12-10 16:44:10 UTC
Permalink
Hello:
I 've been using the recv() function succesfully in a TCP connection.
But now I inttended to use recvfrom() for UDP data transfers, but I
get error 10014. The recvfrom() function have 2 more OPTIONAL
parameters than the recv() function. So, in order to find the problem,
I tried to use the recvfrom() function with just the same 4 parameters
like the recv() function, and I still getting the Error 10014.
Apparently, the parameters socket, receive buffer, buffer lenght, and
flags are the same for those functions; and the last parameters
(struct sockaddr and struct size) are optional, so it would be the
same to use recv() or recvfrom() with the same parameters...But in the
last function I get the reported error...

Some one knows what it could be wrong?

Thanks in Advance!

Daniel
Phil Frisbie, Jr.
2004-12-10 17:39:05 UTC
Permalink
Post by Daniel
I 've been using the recv() function succesfully in a TCP connection.
But now I inttended to use recvfrom() for UDP data transfers, but I
get error 10014. The recvfrom() function have 2 more OPTIONAL
parameters than the recv() function. So, in order to find the problem,
I tried to use the recvfrom() function with just the same 4 parameters
like the recv() function, and I still getting the Error 10014.
Do you use NULL for the last two parameters?
Post by Daniel
Apparently, the parameters socket, receive buffer, buffer lenght, and
flags are the same for those functions; and the last parameters
(struct sockaddr and struct size) are optional, so it would be the
same to use recv() or recvfrom() with the same parameters...But in the
last function I get the reported error...
Some one knows what it could be wrong?
Thanks in Advance!
Daniel
--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com
Loading...