How to combine two binaries in Erlang?
For example, let's say I have:
B1 = <<1,2>>. B2 = <<3,4>>.
How to combine B1 and B2 to create a binary B3 that is <1,2,3,4 โ?
I ask for this because I am writing code to encode a packet for some kind of network protocol. I implement this by writing encoders for the fields in the package, and I need to combine these fields to create the whole package.
Maybe I'm doing it wrong. Should I create a package as a list of integers and convert the list to binary at the last moment?
erlang binaries
Bruno Rijsman Mar 01 '09 at 22:11 2009-03-01 22:11
source share