summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2020-04-16 21:44:35 -0400
committerrsiddharth <s@ricketyspace.net>2020-04-17 20:56:37 -0400
commitb3a1a808f443b75ddf643d8eabd0aa1c8267a922 (patch)
treee5275714e3e06ff5669ac6bc3013f0a1996ba292
parent6b81fc3f0da9205ebc65dfd00837831378a1982c (diff)
Update nserver/README.md
-rw-r--r--nserver/README.md60
1 files changed, 60 insertions, 0 deletions
diff --git a/nserver/README.md b/nserver/README.md
index 7c0cac9..3c1309e 100644
--- a/nserver/README.md
+++ b/nserver/README.md
@@ -1,5 +1,38 @@
# nserver
+A nihilistic stats server written is part of reading Learn C the
+Harday.
+
+
+## compiling
+
+You'll need a C compiler (clang or gcc), the [gdbm][1] library and
+[GNU make][2].
+
+[1]: https://www.gnu.org.ua/software/gdbm
+[2]: https://www.gnu.org/software/make
+
+To compile the server, do:
+
+```
+make
+```
+
+To compile a debuggable version of the server, do:
+
+```
+make dev
+```
+
+The usual:
+
+```
+make clean
+```
+
+clean up things.
+
+
## statserve
To start this server, do:
@@ -9,3 +42,30 @@ To start this server, do:
```
It'll be listening on port 7899.
+
+You can connect as a client to the server via `nc`:
+
+```
+nc 127.0.0.1 7899
+```
+
+
+### client commands
+
+Recognized commands:
+
+
+```
+/create NAME
+/sample NAME
+/mean NAME
+/dump NAME
+/list
+/store NAME
+/load NAME ANOTHER_NAME
+```
+
+The `/store` command stores `NAME` in a persistent database on the disk.
+
+The `/load` command loads the `NAME` from the persistent database into
+memory at ANOTHER_NAME.