thomasvolk / lightbulb

Lighthouse is a library for sending utp broadcasts to find other nodes in the same network.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lightbulb

Lightbulb is a library for sending utp broadcasts to find other nodes in the same network.

Build Status Coverage Status

Installation

The package can be installed by adding lightbulb to your list of dependencies in mix.exs:

def application do
  [applications: [:lightbulb]]
end

def deps do
  [
    {:lightbulb, git: "https://github.com/thomasvolk/lightbulb.git", tag: "master"}
  ]
end

Usage

Start lightbulb with iex -S mix. If you have two other servers running you see this.

$ iex -S mix
[info]  start Elixir.Lightbulb.Ip4UdpServer port=9998

[info]  start Elixir.Lightbulb.Ip4UdpBroadcast port=9998

iex(1)> Lightbulb.get_nodes()
[{{10, 2, 1, 210}, "lightbulb::node"},
 {{10, 2, 1, 211}, "lightbulb::node"},
 {{10, 2, 1, 212}, "lightbulb::node"}]

About

Lighthouse is a library for sending utp broadcasts to find other nodes in the same network.

License:Apache License 2.0


Languages

Language:Elixir 100.0%