send protocol header with endianness and size

testing:

  bin_write_int64_bits
  bin_write_int_{8,16,32,64}bit
  bin_size_...
