* Given a buffer potentially containing * multiple packets, this parses and returns * all of them. * @param {Buffer} buffer to parse * @returns {Array. } parsed packets
(buffer)
| 298 | * @returns {Array.<Packet>} parsed packets |
| 299 | */ |
| 300 | parse(buffer) { |
| 301 | return this.parseRecursive(buffer, []); |
| 302 | } |
| 303 | |
| 304 | /** |
| 305 | * Encodes a payload into a Tuya-protocol-compliant packet. |
no test coverage detected