ki7chen / lua-zmq

Lua 5.3 binding of ZeroMQ 4.x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Lua 5.3 binding of ZeroMQ 4.x

License:Apache License 2.0


Languages

Language:C 86.8%Language:Lua 10.7%Language:CMake 1.6%Language:Makefile 1.0%