Skip to content

Instantly share code, notes, and snippets.

@jestan
Created January 9, 2012 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jestan/1582634 to your computer and use it in GitHub Desktop.
Save jestan/1582634 to your computer and use it in GitHub Desktop.
# Fixed header - size 6 byes
# variable length content
|--------- Header --------------| ----- content--|
+--------+----------+-----------+----------------+
| Tag | Seq No | Length | Content |
| 0xCAFE | 0x0001 | 0x000C | "HELLO, WORLD" |
+--------+----------+-----------+----------------+
until you read the Length of byes, program's state should be related to current message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment