Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Erlang 0.43 KB | None | 0 0
  1. -record(packet,{                % using Big-Endian, This is Network!
  2.         HEAD  = 16# 0000 002A,  % 42, no comment, simple 42
  3.         VERS  = 16# 0000 0001,  % protocol version
  4.         SIZE  = 16# 0000 0000,  % sizeof(crypted_data); //max 4294967295 byte (4GB) or 8#00, then max 65536 byte (64KB) ;
  5.         DATA  = 16# 0000 0000,  % crypted_data
  6.         TAIL  = 16# 0000 0000,  % needed magic const, for end packet
  7.         CRC32 = 16# ffff ffff   % CRC32(crypted_data); - 4 byte
  8. }
  9. ).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement