Fix agreement, there are ready-made quickfix, can be used, but to get started to understand the fix agreement, start:
Settings_ = new Fix::sessionsettings (p.string ());
Store_factory_ = new Fix::filestorefactory (*SETTINGS_);
Log_factory_ = new Fix::filelogfactory (*SETTINGS_);
Initiator_ = new Fix::socketinitiator (*this, *store_factory_, *settings_, *log_factory_);
Initiator_->start ();
Because is the client, therefore must use the Initialtor, the service side words must use acceptor
Here to load the configuration file:
[DEFAULT]
Connectiontype=initiator
reconnectinterval=60
sendercompid=xxxxxxxxx
targetcompid=xxxxxxx
Filelogpath=log
Filestorepath=log
[session]
beginstring=fix.4.2
starttime=01:00:00
endtime=23:59:00
heartbtint=30
socketconnectport=xxx
socketconnecthost=xxx.xxx.xxx.xxx
Datadictionary=fix/fix42.xml
Validateuserdefinedfields=n
Configure to note that the configuration of the two log files is written under "Default". Otherwise, there's always an exception that can't be found.
The specific fields can be seen in the description document