Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from = 2050 # start port
- to = 2075 # end port
- range = from..to
- # map range into a list of tuples {Blip.UDPServer, [port]}
- servers = Enum.map(range, &{Blip.UDPServer, [&1]})
- # start a supervisor with dynamicaly generated list
- Supervisor.start_link(servers, strategy: :one_for_one)
Add Comment
Please, Sign In to add comment