handling endianness when sending string length

also increased const correctness in
blocking_send
fix dumb function name typo