1. If you use nonblocking socket class (aka SocketInitiator/SocketAcceptor), then your send call just puts your messages on a queue.
2. This can always happen because if another end unplugs the cable, the socket won't be shut down properly. That's why there is heartbeat in the protocol. But you can use the blocking socket class to reduce the likelihood that you get a success from sendToTarget but it is actually a failure.
From: yan guan <[hidden email]> To:[hidden email] Sent: Wednesday, May 8, 2013 12:35 AM Subject: [Quickfix-developers] SocketRecvFailed Event
I have a question about QuickFIX.
1. The moment before I call sendtoTarget() the network failed, but I can not get the Logout Event instantly. Also sendtoTarget() returns true, and in fact, the message hasn't been sent out.
2. Anothersituationis after sendtoTarget() successfully, the network failed.
I design my project this way, wait a period of time for the asynchronous message return. What mydifficulty is if timeout and Logout, I can not whether the message is sent out or not.