Okay so I am building server <-> client application.
Basically server receives a packet that contains header[2bytes], cryptokeys[2bytes],and data
I was thinking about building class to load whole packet (byte[]) into it and then process the packet with inside class methods. Now to the question. What would be best approach to this? I need to be able to read Int16 Int32 String(int lenght) and probably float
Edit: Kinda like binaryreader but for byte[] as an input