I have a socket server which keeps listening to incoming requests. The data received will be in the form of binary array of bytes. Data format is something like this. 2321902321221200AA
- Whereas 1 byte is data begin
- 4 bits is version
- 4 bits is data return type
- 5 bytes are product code
- 2 bytes data length
The question is, how to parse the data and segregate the parameters.
Thanks in advance!!