[Quickfix-developers] Reset Session
Brought to you by:
orenmnero
From: Parjeet S. <par...@oa...> - 2008-05-02 06:57:29
|
Hi, This is may be a horrible way of resetting the session but it is serving my purpose. I have set of currency pairs AUD/USD, EUR/USD, AUD/SGD etc, I pass one e.g. AUD/USD currency pair into my sendToTarget session and receive a message which I manipulate in to xml file. All my currency pairs is in datatable Then it goes back to my fromApp procedure and now I have to send new currency pair e.g. EUR/USD. To make this successful I have to reset the session that is by sTest.reset: crack(Param, Param1) Try Dim sTest As QuickFix.Session = QuickFix.Session.lookupSession(Param1) If (sTest.isLoggedOn = True) Then If (sTest.receivedLogon = True) Then Param.clear() sTest.reset() Exit Sub End If End If The reset takes me back to the OnLogon function and start with new set of currency e.g. EUR/USD. Every time I see the message in console..."existing session was forcefully closed by host". At the moment this is working fine but if you have better way of doing, please do share with me. Another issue, I want to log errors in error log file. Is there a way to do in QuickFix. Thanks for your help. PS |