Support Board
Date/Time: Sun, 19 Jan 2025 15:27:25 +0000
Post From: Google Protocol Buffers not working
[2018-04-10 07:56:33] |
User942837 - Posts: 108 |
Hi, I am creating a client wrapper for DTC and managed to get it working on JSON messages. From one of your replies on this forum, you recommend to start with JSON and switch to Google Protocol Buffers. I have downloaded the most recent stable version 3.5.1 and generated code using the https://github.com/DTC-protocol/DTC/blob/master/DTCProtocol.3.proto file on github. This seems to be outdated as it is using DTC version 7 and not 8 (as per the following link https://dtcprotocol.org/DTC_Files/DTCProtocol.proto) but I am not sure if this is the problem. I updated sierra server setting to use Google Protocol Buffers and made a Logon request which isn't working. DTC Protocol server | Incoming connection from 127.0.0.1. | 2018-04-10 09:23:26 DTCServer (55) | Creating socket. | 2018-04-10 09:23:26 DTC client #6. 127.0.0.1 | No activity on network socket. Closing network socket. Bytes in receive buffer: 0 | 2018-04-10 09:23:47 DTCServer (55) | Initiating close of socket by core. | 2018-04-10 09:23:47 DTCServer (55) | Shutdown started. Waiting for graceful close. | 2018-04-10 09:23:47 DTCServer (55) | Close event error. Windows error code 10053: An established connection was aborted by the software in your host machine. | 2018-04-10 09:23:50 * DTCServer (55) | Socket gracefully closed by remote side. | 2018-04-10 09:23:50 DTCServer (55) | Closed. | 2018-04-10 09:23:50 I am simply using the following code and sending bytes to socket. LogonRequest lr = new LogonRequest(); lr.HeartbeatIntervalInSeconds = 5; lr.ClientName = "Sample"; lr.TradeMode = TradeModeEnum.TradeModeDemo; lr.HeartbeatIntervalInSeconds = 5; byte[] loginRequestMsg = lr.ToByteArray(); Can you kindly let me know what am I doing wrong and the best way to proceed as I am stuck. I am using sierra 1702. Thanks |