[Quickfix-users] Problem connecting to broker
Brought to you by:
orenmnero
From: abaraff <ab...@ra...> - 2007-10-11 12:40:31
|
I=E2=80=99m in the process of building my first FIX application, but I=E2= =80=99m running in to some trouble getting connectivity to my broker=E2=80=99s system. I=E2= =80=99ve implemented a pretty basic SocketInitiator C# application that looks like this: public class Program { protected static QuickFix.SocketInitiator _initiator; protected static QuickFix.Application _application; protected static QuickFix.FileLogFactory _logFactory; protected static QuickFix.MessageFactory _messageFactory; protected static QuickFix.SessionSettings _settings; protected static QuickFix.FileStoreFactory _storeFactory; /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { _settings =3D new QuickFix.SessionSettings("sessionsettings.txt= "); _application =3D new QuickFixApp(); _storeFactory =3D new QuickFix.FileStoreFactory(_settings); _logFactory =3D new QuickFix.FileLogFactory(_settings); _messageFactory =3D new QuickFix.DefaultMessageFactory(); _initiator =3D new QuickFix.SocketInitiator(_application, _storeFactory, _settings, _logFactory, _messageFactory ); _initiator.start(); for (int i =3D 0; i < 20; i++) { System.Threading.Thread.Sleep(1000); =20 System.Diagnostics.Debug.WriteLine(_initiator.isLoggedOn().ToString()); } _initiator.stop();=20 } class QuickFixApp : QuickFix.Application { public void fromAdmin(Message p1, SessionID p2) { System.Diagnostics.Debug.WriteLine("fromAdmin\tMessage\t" + p1.ToString()); System.Diagnostics.Debug.WriteLine("fromAdmin\tSession\t" + p2.ToString()); } public void fromApp(Message p1, SessionID p2) { System.Diagnostics.Debug.WriteLine("fromApp\t" + p1.ToString())= ; System.Diagnostics.Debug.WriteLine("fromApp\tSession\t" + p2.ToString()); } public void onCreate(SessionID p1) { System.Diagnostics.Debug.WriteLine("onCreate\t" + p1.ToString()); } public void onLogon(SessionID p1) { System.Diagnostics.Debug.WriteLine("onLogon\t" + p1.ToString())= ; } public void onLogout(SessionID p1) { System.Diagnostics.Debug.WriteLine("onLogout\t" + p1.ToString()); } public void toAdmin(Message p1, SessionID p2) { System.Diagnostics.Debug.WriteLine("toAdmin\tMessage\t" + p1.ToString()); System.Diagnostics.Debug.WriteLine("toAdmin\tSession\t" + p2.ToString()); } public void toApp(Message p1, SessionID p2) { System.Diagnostics.Debug.WriteLine("toApp\t" + p1.ToString()); System.Diagnostics.Debug.WriteLine("toApp\tSession\t" + p2.ToString()); } } When I run it I get an onCreate event that prints out my BeginString:SenderCompID->TargetCompID. Then I never get another event, no= r does isLoggedOn() return true at any point. My event log file has three lines: 20071010-22:32:28 : Created session 20071010-22:32:28 : Connecting to <Remote Machine's IP> on port <Remote Machine's Port> 20071010-22:40:53 : Created session That's it. Is my app ever getting a connection to the remote computer? At what point is this stuff breaking down? I'd like to be able to tell the guys at the brokerage exactly where I'm stuck but it's tough with so little experience. Thanks, Anthony=20 --=20 View this message in context: http://www.nabble.com/Problem-connecting-to-b= roker-tf4606964.html#a13154911 Sent from the QuickFIX - User mailing list archive at Nabble.com. |