summaryrefslogtreecommitdiff
path: root/dis/demo/chat
diff options
context:
space:
mode:
Diffstat (limited to 'dis/demo/chat')
-rw-r--r--dis/demo/chat/chat.disbin0 -> 3995 bytes
-rwxr-xr-xdis/demo/chat/chatclient20
-rw-r--r--dis/demo/chat/chatsrv.disbin0 -> 4058 bytes
3 files changed, 20 insertions, 0 deletions
diff --git a/dis/demo/chat/chat.dis b/dis/demo/chat/chat.dis
new file mode 100644
index 00000000..9dd3a3a3
--- /dev/null
+++ b/dis/demo/chat/chat.dis
Binary files differ
diff --git a/dis/demo/chat/chatclient b/dis/demo/chat/chatclient
new file mode 100755
index 00000000..11ebf15b
--- /dev/null
+++ b/dis/demo/chat/chatclient
@@ -0,0 +1,20 @@
+#!/dis/sh
+load std
+autoload=std
+ndb/cs
+
+chatroom=$1
+
+fn ck {
+ or {$*} {
+ echo chatclient: exiting >[1=2]
+ raise error
+ }
+}
+user="{cat /dev/user}
+
+ck mount -A 'tcp!$registry!registry' /mnt/registry
+ck /dis/grid/remotelogon wm/wm {
+ k = /usr/$user/keyring/default
+ grid/find -a resource chat -a pk `{getpk -s $k} Enter {demo/chat/chat /n/client} Shell {wm/sh}
+}
diff --git a/dis/demo/chat/chatsrv.dis b/dis/demo/chat/chatsrv.dis
new file mode 100644
index 00000000..f333c6be
--- /dev/null
+++ b/dis/demo/chat/chatsrv.dis
Binary files differ