3

I have been struggling a lot to get this to work. Can someone provide an example with any LUA api of 2 scripts that pass a message back and forth.

I have tried Oil, lua-ipc and zeromq. But I face several missing libraries issues.

The ultimate goal is to pass a vector of numbers from one Lua process to another Lua process (with a different version of Lua) without going through disk.

Here is a similar example in python of IPC in a single file. Something similar in lua would be extremely helpful.

I really need an example as my knowledge in pipes or UDP/TCP is not strong.

1 Answer 1

4

The equivalent would be to use luasocket. These examples come very close to the python example given. Here socket:receive() is used for the framing.

https://github.com/diegonehab/luasocket/blob/master/samples/listener.lua

https://github.com/diegonehab/luasocket/blob/master/samples/talker.lua

Sign up to request clarification or add additional context in comments.

2 Comments

definitely should use luasocket
For windows users, I found Luasocket very difficult to get compiled from the main repo so here is a link that has precompiled binaries github.com/alain-riedinger/luasocket

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.