Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
FAST counter party expecting After Encoding calculate total message length of that message and append message length before encoded bytes. So Final Bytes to send are :- Message length bytes + Message bytes. Any solution how to do this?

I'm using QuickFAST but any other library solution will also do(that will give me direction for related solution in QuickFAST)

Thanks in advance


What I have tried:

I try
QuickFAST::Codecs::DataDestination TempEncodingDestion; //temp. Data destination
TempEncodingDestion.putByte(sizeOfEncodedByte); //size of encoded bytes after encodeMessage call
for (unsigned int i = 0; i < encodingDestion.size(); i++) {
const QuickFAST::uchar* tempUcharBegin = encodingDestion[i].begin();
for (unsigned int j = 0; j < encodingDestion[i].size(); j++) {
TempEncodingDestion.putByte(*(tempUcharBegin + j));
}
}
std::string tempString;
TempEncodingDestion.toString(tempString);
std::cout << "\n tempString: " << tempString << std::endl;

and send this to receiver but Its giving me Decoding error: [ERR D9] Unknown template ID:4294967295. So I suspect my work around is not correct.
Post your solution if you found out any solution.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900