Date/Time: Wed, 18 Jul 2018 18:38:44 +0000
Post From: DTC Protocol
|vbmithr - Posts: 204|
I got a crazy idea to write a small C++ application which would construct this message and store it to a file.
You don't have to do this. Indeed you need to support the handshake procedure using the binary encoding but anything you can do in C++ you can do it in Python too.
you're including also all the method code in the binary message.
Yes you are missing the point that the binary encoding is just a serialization format for sending a message over the wire. The fact that they provide a C++ header file is irrelevant, I coded www.bitsouk.com in OCaml, never needed a line of C++.
The header file (DTCProtocol.h) defines C++ structures. You need to understand how those datastructures are represented in memory and send a message of this exact same format. The representation in memory is simple (fields are just added in order), but sometimes the compiler do padding.
I recommand using protocol buffers because you benefit from the provided protocol description and don't have to follow protocol upgrades. You just have to handle logon request and encoding request/response from the binary protocol (I think).