vinawy
asked on
Winsock Error 10014 (C++ Programming)
Hi experts,
I keep receiving error code 10014 whenever my code runs recvfrom() in an finite while loop. I know that this error have something do with the following:
WSAEFAULT
(10014)
Bad address.
The system detected an invalid pointer address in attempting to use a pointer argument of a call. This error occurs if an application passes an invalid pointer value, or if the length of the buffer is too small. For instance, if the length of an argument which is a struct sockaddr is smaller than sizeof(struct sockaddr).
But, I cant figure out whats wrong. Pls advice. Tks
Btw, My BUFFER_SIZE is 80028 but i doubt it has anything to do with the pointers.
I keep receiving error code 10014 whenever my code runs recvfrom() in an finite while loop. I know that this error have something do with the following:
WSAEFAULT
(10014)
Bad address.
The system detected an invalid pointer address in attempting to use a pointer argument of a call. This error occurs if an application passes an invalid pointer value, or if the length of the buffer is too small. For instance, if the length of an argument which is a struct sockaddr is smaller than sizeof(struct sockaddr).
But, I cant figure out whats wrong. Pls advice. Tks
Btw, My BUFFER_SIZE is 80028 but i doubt it has anything to do with the pointers.
memset((void *)&server, 0, sizeof(struct sockaddr_in));
..
..
..
..
bytes_received = recvfrom(sd, buffer, BUFFER_SIZE, 0, (struct sockaddr *)&client, &sender_length);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.