I need to use FIXML with a Server. The solution that came up was to edit
some QuickFIx code to allow this functionality, the idea is to catch every
incoming FIXML message and translate it to FIX, and edit every sending
message to FIXML before the sending.
I creted a new class "FIXMLTranslator" that might do that. So in the QF
class Session.cpp I replaced the line:
message.toString( messageString );
by this one:
messageString = FIXMLParser::ToFIXML(&message);
This is just before the message is send to the socket... as it's just a
string he musn't care about the format...So a message like this(logOn):
8=FIX.4.4 9=129 35=A 34=1 49=Terra Verte LP (AGR Power)
52=20080704-12:07:32.730 56=NYMEX 50=TRDGR 98=0 108=30 141=Y 553=tvapiuser
554=tvapiuser 10=233
converts in:
<FIXML v="4.4" s="20040109" r="20030618"><UserReq
UserReqID="1" UserReqTyp="1" Username="tvapiuser"
Password="tvapiuser"/></FIXML>
To test this, I create an Iniciator and Acceptor applications, I run them
with the original QuickFix libraries and it worked great. But when I enter
the new QF edited libreries this happends:
In Iniciator:
20080708-18:00:30 : Connecting to 192.168......... on port
31155
20080708-18:00:30 : Initiated logon request
20080708-18:00:30 : Socket Error: Connection reset by peer.
20080708-18:00:30 : Disconnecting
In Acceptor:
20080708-18:33:42 : Accepted connection from 192.168.1.105 on
port 31155
I've write some loggers files in the QuickFix C++ code to see if the
logOn message is received and it resulted positive. It seem that for some
reason the iniciator breake the connection after sending the logOn message,
it trys to read from the socket and it doesn't find anything... size=0 means
"Connection reset by peer".
I would like to know every posible scenario in wich a quickFix session is
terminated, cause I can't figger ot out. What fires the event that trys to
read from the socket?? I guess it's not continuosly reading cause it would
find size=0 most of times, and throw "connection reset by peer" all the
time.
Thanks, Julian.
|