how to logon to session after logout in qucikfix contains multiple sessions?

时间:2016-08-31 12:18:54

标签: c# .net quickfix quickfixn

Below attached config file

    [default]
PersistMessages=Y
ConnectionType=initiator
UseDataDictionary=Y

[SESSION] 
ConnectionType=initiator
FileStorePath=store 
FileLogPath=fixlog 
StartTime=00:00:00
EndTime=00:00:00
BeginString=FIXT.1.1
AppDataDictionary=FIX50SP2.xml 
TransportDataDictionary=FIXT.1.1.xml
DefaultApplVerID=FIX.5.0SP2
SenderCompID=xxxxx
TargetCompID=yyyyy
DeliverToCompID=zzzzz
Username=xxxxxx
Password=yyyyyy
SocketConnectHost=aaaa
SocketConnectPort=xxxxx
HeartBtInt=20
#ReconnectInterval=30 
ResetOnLogon=Y
#ResetOnLogout=Y 
#ResetOnDisconnect=Y

[SESSION] 
ConnectionType=initiator
FileStorePath=store 
FileLogPath=fixlog 
StartTime=00:00:00
EndTime=00:00:00
BeginString=FIXT.1.1
AppDataDictionary=FIX50SP2.xml 
TransportDataDictionary=FIXT.1.1.xml
DefaultApplVerID=FIX.5.0SP2
SenderCompID=aaaaa
TargetCompID=bbbb
Username=xxxxx
Password=cccccc
DeliverToCompID=yyyyy
SocketConnectHost=xxxxx
SocketConnectPort=dddddd
HeartBtInt=20
#ReconnectInterval=30 
ResetOnLogon=Y

TO logout one session i'm sending

QuickFix.Session.LookupSession(priceSessionID).Logout();

i received logout for the particular session. Here my question is, how to logon to the same session without logging out another session?? and with out stopping the initiator.

1 个答案:

答案 0 :(得分:0)

QF并非真正用于手动登录或注销的用途。

预期的工作流程是:

  1. 随时启动您的应用。
  2. 如果当前时间在配置的会话窗口内,请尝试登录
  3. 如果当前时间不在配置的会话窗口内,请等到会话开始时间再尝试登录
  4. 当会话结束时间发生时,注销。