❔ Constructing big endian byte message from multiple integers
Hey all, I'm following the torrent protocol trying to create messages for the protocol to give trackers; I'm not getting a response back and I'm not 100% sure what I got wrong, here is some sample code and the protocol itself:
4 Replies
example for this particular request:
in total
byte[16]
my struct for this:
this is the big endian part, which I assume I haven't done yet
I checked my hardware and its little endian, does that mean I need to reverse each number's bytes? or just reverse the entire array?
for example:
for array :
{ 0x36, 0xf9, 0x1b, 0x8d }
(together: 36F91B8D
)
first option: 639FB1D8
or the entire array: D8B119F36
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.