Login Page - Create Account

Support Board

Date/Time: Fri, 20 Jul 2018 06:42:18 +0000

Post From: DTC Protocol

[2016-03-23 21:41:03]
User783015 - Posts: 7
I am trying to write a DTC client Python class which my trading software will use to connect to Sierra Chart DTC server. I'd like to use the JSON encoding for obvious reasons. However the EncodingRequest message must be sent in a binary format and that's quite a problem. I got a crazy idea to write a small C++ application which would construct this message and store it to a file. This would allow me to take that string, hardcode it to my Python script and send it over the socket to force the server to JSON encoding. But there must be an easier way to do this, right?

Looking into it a bit more, the s_EncodingRequest structure is much more complex than I originally thought. I now see all the methods it is implementing and I assume that when you serialize the structure to send it over the wire, you're including also all the method code in the binary message. I was thinking about using the protocol buffers but there's the same problem again - first you need to send the EncodingRequest message in the binary format to request the encoding change. The whole point of using JSON or protocol buffers is to enable interoperability with languages which may use different binary representation of data than C++ and converting the data to this binary format may be tedious, right? Forcing the application to send the EncodingRequest message in the binary format imho defeats that point. If I'm writing a DTC client which may connect to different unknown DTC servers, I'm pretty much forced to write the client in C++.

Or am I missing anything?
Date Time Of Last Edit: 2016-03-23 22:32:50