[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

[Solved] I have a receive block in erlang.If there is a timeout in my gen-server it returns ok but not the actual value.How to return actual value

[ad_1] I have a receive block in erlang.If there is a timeout in my gen-server it returns ok but not the actual value.How to return actual value [ad_2] solved I have a receive block in erlang.If there is a timeout in my gen-server it returns ok but not the actual value.How to return actual value

[Solved] Spanning repeatable keys

[ad_1] In Elixir it’s quite easy with Enum.group_by/3: iex> Enum.group_by(values, fn {key, _} -> key end, fn {_, value} -> value end) %{ “Caerus1” => [“Ramses Refiner”, “Jupiter Refiner”, “Jupiter Other”, “Trader 13”, “Cathode Supplier 4”], “Dionysus3” => [“Cathode Supplier 4”, “Ramses Refiner”, “Trader 13”, “Jupiter Refiner”, “Jupiter Other”], “Prometheus2” => [“Jupiter Other”, “Ramses Refiner”, … Read more

[Solved] How to build a TCP server with erlang?

[ad_1] Check this thing out : TCP Server But I would recommend you to start with gen_tcp and gen_udp modules first before getting started with OTP framework to design your server/Client. Happy Erlang Coding 🙂 [ad_2] solved How to build a TCP server with erlang?