[Quickfix-users] How do I close acceptor socket in C#.net 2005
Brought to you by:
orenmnero
From: Chris v. O. <chr...@gn...> - 2006-10-16 02:41:25
|
Ive tried a few ways and they all seem to crash my app.... here is my latest attempt: delegate void D_StopSession(); private void stopSession() { if (!InvokeRequired) { try { this.acceptor.stop(); } catch (Exception ex) { MessageBox.Show("Exception: " + ex.Message); } this.SetConnectionState(); } else { Invoke(new D_StopSession(stopSession),new object[]{}); } } I dont see any Exception but the application just hangs. I just want to close the socket. acceptor was created like: messageFactory = new DefaultMessageFactory(); acceptor = new SocketAcceptor( App, storeFactory, settings, messageFactory ); and was tested for null and passed acceptor.IsConnected() before calling this method. My settings are.... [DEFAULT] ConnectionType=acceptor SocketAcceptPort=5001 SocketReuseAddress=Y StartTime=00:00:00 EndTime=00:00:00 [SESSION] BeginString=FIX.4.2 SenderCompID=ARCA TargetCompID=TORC FileStorePath=store DataDictionary=C:/etc/FIX42.xml Thanks, Chris |