How do I receive data after an completed AcceptEx operation?
-
Hello, I want to receive data after an AcceptEx() call. A brief overview: 1. I listen on a port and receive data with the buffer I've passed to AcceptEx(). 2. When there is incoming data I process the data and send a return packet. 3. Now I wan't to receive data from the same connection again. I tried to use WSARecv() on the socket, but everytime I use WSARecv() I get an error with the error code 10014 (The system detected an invalid pointer address in attempting to use a pointer argument in a call). When I create a new socket with the socket(), bind(), listen() accept() procedure and pass it to the WSARecv() function I have no problem in calling WSARecv(), but I wan't to receive data from the socket on which I sent data. Can I use AcceptEx(), send() and then WSARecv() in this order??? How would you do this? ----------------- Thank you for your attention, bond006
-
Hello, I want to receive data after an AcceptEx() call. A brief overview: 1. I listen on a port and receive data with the buffer I've passed to AcceptEx(). 2. When there is incoming data I process the data and send a return packet. 3. Now I wan't to receive data from the same connection again. I tried to use WSARecv() on the socket, but everytime I use WSARecv() I get an error with the error code 10014 (The system detected an invalid pointer address in attempting to use a pointer argument in a call). When I create a new socket with the socket(), bind(), listen() accept() procedure and pass it to the WSARecv() function I have no problem in calling WSARecv(), but I wan't to receive data from the socket on which I sent data. Can I use AcceptEx(), send() and then WSARecv() in this order??? How would you do this? ----------------- Thank you for your attention, bond006