Hello,
I am trying to send a message and receive a response using asynchonous sockets in .net. In a function I do the following
1. Send a message thru the socket
2. While(fullresponserecieved)=false, this holds state, this variable turns to true while I receive 0 bytes(or end of message).
3. Then I execute the rest of my function.
I think this is causing a problem with the threads. The thread executing function and the asynchronous socket threads. Is this the correct way to do this? Or should I be using a blocking thread? It may take some time to receive the entire response, up to about 1 minute, I wouldn't want my application to become unresponsive for that period of time.
Thanks,
-ren