Establishing Session

88 views
Skip to first unread message

Zauri Meshveliani

unread,
Feb 15, 2018, 3:47:34 PM2/15/18
to fix8 support
Hello, 

I've been trying to use open-source fix8 version. 
In the documentation there are tips how to establish the session

ClientSession<myfix_session_client>::ClientSession_ptr mc(new ClientSession<myfix_session_client>(TEX::ctx(), 
    "myfix_client.xml""DLD1"));
mc->start(true);

I use FIX44.xml configuration, in which Logon message doesn't require 
Username and Password fields, but my server demands it to be provided.

I tried to search for ClientSession implementation to change .start() function but couldn't find it...

Is there any way to change the Logon message this mc->start() generates?

Thanks beforehand

cinar...@gmail.com

unread,
Mar 25, 2018, 10:39:02 AM3/25/18
to fix8 support
Hi,

You should override generate_logon method of your session client.

Message *myfix_session_client::generate_logon(
const unsigned heartbeat_interval, const f8String davi) {
Message *msg(Session::generate_logon(heartbeat_interval, davi));

*msg << new NX::Username(username_) << new NX::Password(
password_) << new NX::ResetSeqNumFlag(true);

return msg;
Reply all
Reply to author
Forward
0 new messages