I am sending a message like this:
char buffer[175];
sprintf(buffer, "MD: %4ld %2d %10s %5s %7.2f %5d\n"
, id
, position
, *(MktDepthOperation::ENUMS) operation
, *(MktDeptSide::ENUMS)side
, price
, size);
PrintProcessId, printf(buffer);
SolSendMessage("testhello", buffer);
...
void SolSendMessage(const char* topic, const char *text_p)
{
...
if (s_canSend) {
if ((rc = solClient_session_sendMsg(session_p, msg_p)) != SOLCLIENT_OK) {
...
}
On the sub side, I am just dumping the message. How do I sscanf the fields back from the binary buffer that encodes the solace proprietary format? I am trying to avoid google protocol buffers
and using the recommended Solace proprietary format
.
solClient_rxMsgCallback_returnCode_t
messageReceiveCallback ( solClient_opaqueSession_pt opaqueSession_p, solClient_opaqueMsg_pt msg_p, void *user_p )
{
//printf ( "Received message:\n" );
solClient_msg_dump ( msg_p, NULL, 0 );
printf ( "\n" );
msgCount++;
return SOLCLIENT_CALLBACK_OK;
}