Hi all, I am porting a server program originally written with QuickFIX C++ .Net wrapper to QuickFIX/n. It worked well for several hours until it suddenly crashed with this SocketException (extracted from Event Viewer):<br>
<br><div style="margin-left:40px"><span style="font-family:courier new,monospace">Framework Version: v4.0.30319<br>Description: The process was terminated due to an unhandled exception.<br>Exception Info: System.Net.Sockets.SocketException<br>
Stack:<br>   at System.Net.Sockets.Socket.Send(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)<br>   at QuickFix.ClientHandlerThread.Send(System.String)<br>   at QuickFix.Session.Send(System.String)<br>   at QuickFix.Session.SendRaw(QuickFix.Message, Int32)<br>
   at QuickFix.Session.Send(QuickFix.Message)<br>   at QuickFix.Session.SendToTarget(QuickFix.Message, QuickFix.SessionID)<br>   at MyProg.SendData(System.Collections.Generic.List`1<NoMDEntriesGroup>)<br>   ...</span><br>
</div><br>I am guessing the SocketException could be due to various reasons, e.g. TCP buffer full, client disconnected, etc. That happens on a busy network. <br><br>What I would like to know though is how I should handle this issue. Do I need to put a try-catch around ALL calls to Session.SendToTarget? I've never did this in the server program when using the .Net wrapper and have assumed that SendToTarget would always return gracefully with false if it failed to send. What is the recommended best practice? Advice and suggestions are most appreciated.<br>
<br>Regards,<br>S<br>