mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
add packet parser example
This commit is contained in:
parent
f70049d38b
commit
bc11e6a7fe
1 changed files with 6 additions and 0 deletions
6
examples/parse_packet.js
Normal file
6
examples/parse_packet.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import Packet from "../src/packet.js";
|
||||
|
||||
const bytes = Buffer.from("0200B401DF6528CC9778A56F36FE9399A5CF6B0C7EDE", "hex");
|
||||
const packet = Packet.fromBytes(bytes);
|
||||
|
||||
console.log(packet);
|
||||
Loading…
Add table
Add a link
Reference in a new issue