Initial commit

This commit is contained in:
2018-01-24 17:51:07 +01:00
commit 1d74a399b5
341 changed files with 28906 additions and 0 deletions

19
fs/clockClient.js Normal file
View File

@@ -0,0 +1,19 @@
load('api_net.js');
load('api_rpc.js');
let port=2000;
let lastMessage = "";
Net.bind(port, function(conn, ev, ev_data) {
if (ev !== Net.EV_ACCEPT) return;
Net.send(conn, JSON.stringify({a: 1, b: 'hey!'}));
Net.close(conn);
}, true);
print('TCP server is listening on port ', port);
RPC.addHandler('UpdateClock', function(args) {
lastMessage = JSON.stringify(args);
});