aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Pickering <alex@cogarr.net>2020-07-13 16:38:42 -0400
committerAlexander Pickering <alex@cogarr.net>2020-07-13 16:38:42 -0400
commitf8177ff97d77e29fa52ed55fb340fc63af90001f (patch)
treed04d608aebee689852d0836101658d2d8f76f2e1
parentcb3bd57fb3bac138a5426960e413ddd2176c4616 (diff)
downloadlua-nng-f8177ff97d77e29fa52ed55fb340fc63af90001f.tar.gz
lua-nng-f8177ff97d77e29fa52ed55fb340fc63af90001f.tar.bz2
lua-nng-f8177ff97d77e29fa52ed55fb340fc63af90001f.zip
Add readme
Add a readme with a usage example
-rw-r--r--README.md27
-rw-r--r--lua-nng-dev-1.rockspec3
2 files changed, 29 insertions, 1 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..188af88
--- /dev/null
+++ b/README.md
@@ -0,0 +1,27 @@
+# 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 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 sepc/start\_spec.lua
+
diff --git a/lua-nng-dev-1.rockspec b/lua-nng-dev-1.rockspec
index 5cf013f..0be82f6 100644
--- a/lua-nng-dev-1.rockspec
+++ b/lua-nng-dev-1.rockspec
@@ -2,7 +2,8 @@ package = "lua-nng"
rockspec_format="3.0"
version = "dev-1"
source = {
- url = "*** please add URL for source tarball, zip or repository here ***"
+ url = "git+https://cogarr.net/source/cgit.cgi/lua-nng",
+ tag = "v0.1"
}
description = {
summary = "A simple binding for Nanomessage Next Generation",