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.
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 | 16 years ago | |
| perf | 16 years ago | |
| rockspecs | 16 years ago | |
| .gitignore | 16 years ago | |
| API.md | 16 years ago | |
| Makefile | 16 years ago | |
| README.md | 16 years ago | |
| zmq.c | 16 years ago | |