{{Quickfixn}} How do I force-disconnect FIX?
Thomas Tomiczek
t.tomiczek at nettecture.com
Thu Mar 22 23:51:26 PDT 2012
I am asking because... calling Stop on an initiator does not work (data still flows in). At the same time, there is no dispose method there (should it not implement IDisposable? After all it has internal threads)?
I am creating for example a price link like that:
var upPricePath = Path.Combine(folder, "Fix.UpPrice.cfg");
SessionSettings upPriceSettings = new SessionSettings(upPricePath);
MessageStoreFactory upPriceStore = new FileStoreFactory(upPriceSettings);
LogFactory upPriceLog = new FileLogFactory(upPriceSettings);
upPriceInitiator = new QuickFix.Transport.SocketInitiator(upPrice, upPriceStore, upPriceSettings, upPriceLog);
upPriceInitiator.Start();
Closing it like this:
upPriceInitiator.Stop();
upPriceInitiator = null;
does NOT result in for example the port of the FIX session being made available - this is bad. I need the ability to take down then re-establish initiators (for example to change the configuration file).
Also, when I have a long running request (request security definitions) then.... Well.... The data keeps pouring in.
So what is the best / standard method to FORCE logout an initiator? In my opionion:
* SocketInitiator should implement IDisposable properly, releaseing all unmanaged ressourcs. It is in fact a form error in FxCop to hold a reference to something that is IDisposable (socket) and not be disposable.
* Force-Logouts on Stop
* Release all ressources on Stop.
Regards
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20120323/c92bd5fd/attachment.htm>
More information about the Quickfixn
mailing list