Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 21:17:29 +0000



Post From: DTC Protocol

[2016-06-07 07:33:03]
romulko - Posts: 2
Hello there.
I try to connect java through DTC Protocol > Google Buffer > compile into java source > connect to the SC.

When I send pure bytes (Encoding request is: 16 0 6 0 7 0 0 0 4 0 0 0 68 84 67 0) that Guilhermer mentioned above - the SC sucsessfuly returned result.

But when I try to encode Java class DTCProtocol.EncodingRequest into byte code - there a bit different byte code in the result:

DTCProtocol.EncodingRequest encodingRequest = DTCProtocol.EncodingRequest.newBuilder()
.setEncoding(DTCProtocol.EncodingEnum.PROTOCOL_BUFFERS)
.setProtocolVersion(DTCProtocol.DTCVersion.CURRENT_VERSION.getNumber())
.setProtocolType("DTC")
.build();

bytes = encodingRequest.toByteArray();

bytes = [8, 7, 16, 4, 26, 3, 68, 84, 67];

Am I do something wrong? Thanks.