I am doing my own protocol to send over a network, and I use a structure such as :
Code: Select all
packet.mystruct
Structure mystruct
block1.b[256]
block2.b[256]
block3.b[256]
. ..
endStructure
when I request the byte of packet\block1[56] I have the packet\block1[56] which was sent.
So what's the problem ?
When I dump the structure memory into a text file for instance, I see that the total bytes is indeed the total structure size (let's say 768 bytes) but that the first 256 bytes are starting after 76 random data bytes.
I mean that the packet is as follow :
76 bytes of random data (don't know what it is)
256 bytes
256 bytes
256 bytes (-76 so)
I mean that :
Code: Select all
PeekB(@packet+1)
Code: Select all
PeekB(@packet\block1[1])
What are these first weird bytes ? is it a kind of structure declaration ?
To say how many part there is, how many long ?
Or is there definitly a bug in my prog ? (either for the output or for making the packet).
What is weird is that when I access the struture normally (@packet\block1[1]) there is no gap of 76 bytes, each byte is where it should be, that's why I am thinking to a structure declaration.
any idea ?

