You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Douglas Creager 1b1191a3be Extracting underlying C context object
You can now use the Context:lightuserdata() method to get a light
userdata pointer to the underlying ZeroMQ C context object.  On the
receiving end, the zmq.init() function can now take in a light
userdata object, which creates a new Context object wrapper for an
existing C context object.

The main use case for this is to provide an easy way to pass a ZeroMQ
context to another Lua interpreter.  The two interpreters (which
presumably would be running in separate threads) can then use ZeroMQ
sockets from this context to communicate with each other.

In this use case, we have to be sure not call zmq_term in the Context
__gc metamethod, since both Lua interpreters would try to do this.
Internally, we keep an additional boolean field that indicates whether
a Context object is responsible for terminating the context.  When
created with a light userdata, this will be false.  When created
normally, the default is true, but can be overridden.
16 years ago
examples zmq:init(io_threads) 16 years ago
perf zmq:init(io_threads) 16 years ago
rockspecs Removed binary rockspec 16 years ago
.gitignore Giving lua-zmq new API semantics. 16 years ago
API.md zmq:init(io_threads) 16 years ago
Makefile Changing makefile to use CC variable rather than gcc hard coded 16 years ago
README.md links 16 years ago
zmq.c Extracting underlying C context object 16 years ago

README.md

About

Lua bindings to zeromq2.

Installation

$ make install

API

See API.md and ØMQ docs.