I am trying to send a packet of information(256bytes) by using UDP to a data logger.
so far i know to send a message. here is the code.
byte messageBytes = Encoding.UTF8.GetBytes("");
to send an object, here is another code.
byte test = Reflection.Serialize(kid1, typeof(Kid))
The data logger I am trying to communicate with receives Packet Contents in the attached picture.
My question is: How do I send the first 12 bytes in the type of string, then the rest of bytes in the type of integer in a packet?
I have thought of using a “structure” but i have no idea how to continue. meanwhile, i am still thinking about how to do it. :’(