From 346304da786a652f25f73ee80957ec6fd16716c8 Mon Sep 17 00:00:00 2001 From: Alex Pickering Date: Sun, 12 Sep 2021 16:58:26 -0500 Subject: Line endings to unix Convert all line endings to unix line endings. --- README.md | 71 +++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 27 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 3c5bd9a..86ab04e 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,44 @@ -# lua-nng - -This is a simple binding of [Nanomessage Next Generation](https://github.com/nanomsg/nng) to lua. - -## Installation - -The easiest way to download lua-nng is with [luarocks](https://github.com/luarocks/luarocks). - -``` -luarocks install --server=http://rocks.cogarr.net lua-nng -``` - -## Example - - local nng = require("nng") - - local s1 = nng.pair1_open() - local s2 = nng.pair1_open() - - s1:listen("ipc:///tmp/pair.ipc") - s2:dial("ipc:///tmp/pair.ipc") - - s2:send("hello") - print(s1:recv()) --prints "hello" - -For more examples, see spec/start\_spec.lua - +# lua-nng + +This is a simple binding of [Nanomessage Next Generation](https://github.com/nanomsg/nng) to lua. + +## Installation + +First you'll need a copy of [nng](https://github.com/nanomsg/nng) + + git clone https://github.com/nanomsg/nng + cd nng + mkdir build + cd build + cmake .. -DBUILD_SHARED_LIBS=True + make && sudo make install + + +The easiest way to download lua-nng is with [luarocks](https://github.com/luarocks/luarocks). + +You can also clone this repository and build locally + + git clone https://cogarr.net/source/cgit.cgi/lua-nng + cd lua-nng + sudo luarocks build + + +``` +luarocks install --server=http://rocks.cogarr.net lua-nng +``` + +## Example + + local nng = require("nng") + + local s1 = nng.pair1_open() + local s2 = nng.pair1_open() + + s1:listen("ipc:///tmp/pair.ipc") + s2:dial("ipc:///tmp/pair.ipc") + + s2:send("hello") + print(s1:recv()) --prints "hello" + +For more examples, see spec/start\_spec.lua + -- cgit v1.2.3-70-g09d2