0

I am able to chunk data from client to server however before sending chunks of the data I'd like to send the hash of the complete dataset so when the server reconstructs the chunks it can verify whether the reconstructed data is correct or not.

I've seen users use oneof in messages however I've no idea how to use it. The idea is to use:

message Data {
   oneof data_fields {
         int32 hash = 1;
         bytes chunk = 2;
   }
}

The idea is to send the hash first and the proceeding bytes. Any examples or resources would be great.

TecGuy94
  • 49
  • 1
  • 8

0 Answers0