Skip to content
ZeroMQ module for LAN discovery and presence
Lua Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis
rockspecs
src/lua/lzmq
test
.travis.yml
LICENSE
README.md
lakeconfig.lua
lakefile

README.md

lzmq-beacon

Build Status Licence

Usage

--
-- service node
local service_beacon = zbeacon.new(9999)
  :interval(100)
  :publish(announcement)
--
-- client node
local client_beacon = zbeacon.new(9999):subscribe()

-- poll `client_beacon` to receave IP and announcement
local ipaddress, announcement = client_beacon:recv()

##Limitation

  • LuaSocket do not provide way to get its own IP or enumerate interfaces. So you can provide IP address as first argument in zbeacon constructor. e.g. beacon = zbeacon.new('192.168.1.10', 9999)
  • zbeacon always use broadcast address 255.255.255.255
You can’t perform that action at this time.