Re: [Quickfix-developers] SocketInitiator.stop()
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2005-03-23 17:27:04
|
We have addressed starting and stopping issues in CVS. Are you also using .NET or another API? --oren ----- Original Message ----- From: "John Debay" <joh...@ch...> To: "Patrick Flannery" <pat...@ch...>; <qui...@li...> Sent: Wednesday, March 23, 2005 11:09 AM Subject: RE: [Quickfix-developers] SocketInitiator.stop() > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html > > Has anyone experienced similar behavior? Does anyone have a solution? > > We are using QuickFIX 1.9.3. > > Thanks, > John > > > ________________________________ > > From: qui...@li... > [mailto:qui...@li...] On Behalf Of > Patrick Flannery > Sent: Friday, March 18, 2005 1:57 PM > To: qui...@li... > Subject: [Quickfix-developers] SocketInitiator.stop() > > > > Hello, > > There were some recent messages about the > SocketInitiator::stop() causing a deadlock. An update was posted in cvs > where the code has a flag allowing the user to force a close. The C# > version of SocketInitiator does not have this same flag and may be needed > because the SocketInitiator.stop() function deadlocks. Also, and this is > real simple, is this correct way to start a fix session? > > > > void start(){ > > initiator.start(); > > > > //Wait for the FIX.onLogon(Session ) to be signaled. > > WaitForConnect(CONNECT_TIMEOUT); > > > > //Fix logon > > QuickFix44.Logon fixLogon = new Logon(); > > fix.Send(fixLogon); > > > > //Application Logon > > QuickFix44.UserRequest logon = new QuickFix44.UserRequest(); > > QuoterParamaters fields = new QuoterParamaters(credentials); > > Set(logon, new > UserRequestType(UserRequestType.LOGONUSER));//Set the logon flag to true > > > > fix.Send(logon); > > } > > > > > > With a corresponding stop: > > > > void stop() > > { > > //Application Logoff > > QuickFix44.UserRequest logoff = new QuickFix44.UserRequest (); > > Set(logoff, new UserRequestType(UserRequestType.LOGOFFUSER)); > > fix.Send(logoff); > > > > //Fix logoff > > if(fix.LoggedOn) > > { > > QuickFix44.Logout fixLogout = new Logout(); > > fix.Send(fixLogout); > > } > > > > /** > > * This causes the thread to hang. > > * */ > > > > initiator.stop(); > > } > > > > Thanks in advance. > > > > Patrick Flannery > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 > Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows > Embedded(r) & Windows Mobile(tm) platforms, applications & content. > Register > by 3/29 & save $300 > http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |