[This message was posted by Chengda Zhang of Saratoga Capital LLC 
<[email protected]> to the "4.0 Session" discussion forum at 
http://fixprotocol.org/discuss/12. You can reply to it on-line at 
http://fixprotocol.org/discuss/read/6f12cc44 - PLEASE DO NOT REPLY BY MAIL.]

I am new to QuickFix and has some problem with it. Right now I am trying to 
establish a session with the server. The provider asked me to download a 
gateway client software, which serves as a VPN client for FIX connections over 
the internet. And I was given the IP address and port, with which I need to use 
to rout my orders. Now I have the session file as follows:

[DEFAULT]
ConnectionType=initiator
LogonTimeout=30
ReconnectInterval=30
ResetOnLogon=Y

[SESSION]
BeginString=FIX.4.2
SenderCompID=MyID
TargetCompID=TheirID
StartDay=sunday
EndDay=friday
StartTime=09:00:00
EndTime=21:00:00
HeartBtInt=30
CheckLatency=Y
MaxLatency=240
SocketConnectPort=port # provided
SocketConnectHost=IP provided
Password=password
UserName=MyID
EncryptMethod=0
SessionQualifier=TheirID
UseDataDictionary=Y
DataDictionary=C:\Users\Chandler\Desktop\FixPresentation\FIX42.xml
FileStorePath=C:\LogInfo

And my C# code as follows:

using System.Threading;
using QuickFix;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SessionSettings settings = new SessionSettings("C:\\Setting.txt");
Application application = new Application();
FileStoreFactory storeFactory = new FileStoreFactory(settings);
FileLogFactory logFactory = new FileLogFactory("C:\\LogInfo");
MessageFactory messageFactory = new DefaultMessageFactory();

SocketInitiator initiator = new SocketInitiator(application, storeFactory, 
settings, logFactory, messageFactory);
initiator.start();
int i = 0; 
do
{
Thread.Sleep(1000);
Console.WriteLine(i);
i++;
}
while((!initiator.isLoggedOn ())&&(i<30));
if (initiator.isLoggedOn ())
{
Console.WriteLine("I am logged in!");
}
initiator.stop(true);
Console.WriteLine("Finished!");
initiator.Dispose();
}
}
}

Now, after I run the C# code, and start the gateway client, my provider said 
that they could see me log in but did not see any message being sent and they 
had to log me off.

So my question is: is there anything wrong in what have done, i.e. the session 
code, C# code?

Thanks a lot!

[You can unsubscribe from this discussion group by sending a message to 
mailto:[email protected]]

-- 
You received this message because you are subscribed to the Google Groups 
"Financial Information eXchange" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fix-protocol?hl=en.

Reply via email to