RE: [Quickfix-developers] controlling quickFix engine
Brought to you by:
orenmnero
From: Michael R. <mr...@li...> - 2004-12-09 18:38:47
|
Ok, let me try again - what I need to do is=20 1. send logout,=20 2. disconnect,=20 3. wait for login from counterparty, 4. and accept that login When I do Session::logout everything's fine until 4. when login comes. Then in void Session::next() { QF_STACK_PUSH(Session::next) try { if( !m_enabled ) { if( isLoggedOn() ) { if( !m_state.sentLogout() ) { m_state.onEvent( "Initiated logout request" ); generateLogout(); } } I get to generateLogout() and login by countreparty fails. What am I doing wrong? -----Original Message----- From: Oren Miller [mailto:or...@qu...] Sent: Thursday, December 09, 2004 10:55 AM To: Michael Raykh Cc: qui...@li... Subject: Re: [Quickfix-developers] controlling quickFix engine Well, calling logout will keep the Session in a logout state until you=20= call login. So if you want to just drop the connection and reconnect,=20= you should call logout and login in sequence. If you want to just do a=20= harsh disconnect without dealing with such things, there is=20 Session::disconnect. This will just cut the connection. The Session::reset method does exactly what you describe concerning=20 end-of-day. It will reset all sequence numbers to 1 and clear out the=20= state. In fact, if you just call reset, it will do the disconnect for=20= you as well. --oren On Dec 9, 2004, at 9:41 AM, Michael Raykh wrote: > Tnx, somehow I thought I need to use generateLogout... > > Still can't get it right with Session::logout - logout does go through > but subsequent login from broker fails 'cause ) is=20 > false somehow... > > As far as end-of-day - we need to be able in the middle of the=20 > session disconnect > clean everything and start from fresh as if session never started that=20= > day. > > -----Original Message----- > From: Oren Miller [mailto:or...@qu...] > Sent: Thursday, December 09, 2004 9:47 AM > To: Michael Raykh > Cc: qui...@li... > Subject: Re: [Quickfix-developers] controlling quickFix engine > > > > For connect/disconnect there are the Session::logon() and=A0 > Session::logout() methods.=A0 There is Session::reset(),=A0 > Session::setNextSenderMsgSeqNum(), and=A0 > Session::setNextTargetMsgSeqNum().=A0 TestRequest and ResendRequest=A0 > messages can be sent using sendToTarget().=A0 Not sure what you mean b= y=A0 > end of day.=A0 These are all public methods, at least in the most=20 > current=A0 > version:=A0 > http://www.quickfixengine.org/quickfix/doc/html/ > class_f_i_x_1_1_session.html > > --oren > > On Dec 9, 2004, at 7:39 AM, Michael Raykh wrote: > > > Looking for a way to monitor and control QF for our support desk.=20 > Need=A0 > > to do things like disconnect, > > reset, reset seq number, test request, resend request, end-of-day.=A0= > > Seems that the functionality needed exists but more often than not=A0= > > it's private methods in Session, SessionState... > > > > - is this correct? > > - seems that something like this might be pretty common need- would=20= > it=A0 > > make sense to provide neccessary "hooks"? > > > > Michael > >=A0 This email and any files transmitted with it are confidential and=A0= > > intended solely for the use of the individual or entity to whom they=A0= > > are addressed. If you have received this email in error please=20 > notify=A0 > > the system manager. This message contains confidential information=20= > and=A0 > > is intended only for the individual named. If you are not the named=A0= > > addressee you should not disseminate, distribute or copy this e-mail.= > This email and any files transmitted with it are confidential and=20 > intended solely for the use of the individual or entity to whom they=20= > are addressed. If you have received this email in error please notify=20= > the system manager. This message contains confidential information and=20= > is intended only for the individual named. If you are not the named=20 > addressee you should not disseminate, distribute or copy this e-mail.=20= This email and any files transmitted with it are confidential and intende= d solely for the use of the individual or entity to whom they are address= ed. If you have received this email in error please notify the system man= ager. This message contains confidential information and is intended only= for the individual named. If you are not the named addressee you should = not disseminate, distribute or copy this e-mail. |