01-19-2012 10:25 AM
I have an application that sends and receives small packets of data on a tcp/ip socket.
My application sends the data and then waits for a response.
My applications works great in debug mode but when I try it in release mode I have problems.
I will be sending data packets using:
sendStatus = send( cmdSock, (char *)msg, msgLen, 0 );
if( sendStatus == SOCKET_ERROR )
// Send error
if( select( 0, &readfds, 0, 0, &timeout ) == 0 )
// socket timed out
status = recv( cmdSock, (char *)msg, msgLen, 0 );
if( status == SOCKET_ERROR )
// recv error
The application will be sending many packets about every 1 second. Then randomly, a packet will fail because of a socket timed out.
When the error occurs:
The send command sends the data, No SOCKET_ERROR comes back.
The recv command times out waiting for the response.
When the error occurs the application that is receiving the data packets never received the data packet, and thus does not respond.
Again this ONLY happens in Release configuration, it NEVER fails in Debug configuration.
Has anyone ever seen an issue like this?
01-20-2012 04:31 PM
Could you be a little more specific on what the error is you actually seeing? What is the error code you are seeing if any? Could you post your CVI project so others can look at the code? Are you able to run a CVI TCP/IP example with no issues? Help » Example Finder » TCP/IP