input byte array should be the following format evt\0(4byte) + type(1byte) + usize( bytearray or list) (4 bytes) + data...
(input []byte)
| 67 | // input byte array should be the following format |
| 68 | // evt\0(4byte) + type(1byte) + usize( bytearray or list) (4 bytes) + data... |
| 69 | func parseNotify(input []byte) (interface{}, error) { |
| 70 | if bytes.HasPrefix(input, []byte("evt\x00")) == false { |
| 71 | return nil, ERROR_PARAM_FORMAT |
| 72 | } |
| 73 | |
| 74 | source := common.NewZeroCopySource(input[4:]) |
| 75 | |
| 76 | return DecodeValue(source) |
| 77 | } |