[Solved] exception error: bad argument in function [closed]
[ad_1] Presumably this happens because Token and Payload are binaries, not integers. When constructing a binary like this, everything is assumed to be a 1-byte integer unless specified otherwise. To insert Token and Payload into the binary being constructed, use the /binary suffix: Packet =[<<0:8, TokenLength, Token/binary, PayloadLength, Payload/binary>>], [ad_2] solved exception error: bad argument … Read more