/lua-zmq

Lua 5.3 binding of ZeroMQ 4.x

Primary LanguageCApache License 2.0Apache-2.0

lua-zmq

lua-zmq is a simple(not full-complete) Lua binding of ZeroMQ 4.x, not production ready!

Installation

First obtain CMake and conan.

Linux

Type make build in a Linux or WSL shell

Windows

  • pip install conan
  • mkdir build && cd build && conan install ..

Usage at a glance

local zmq = require 'luazmq'
zmq.init()

local c = zmq.socket(zmq.REQ)
c.setIdentity('node002')
while true do
    c.send('hello')
    local rep = c.recv()
    print(rep)
end

zmq.shutdown()
zmq.terminate()

See more exampes and API doc