From d20cf2e1d80d1f5b774a45eeb0a6bb2568507770 Mon Sep 17 00:00:00 2001 From: PhilipTrauner Date: Mon, 2 Nov 2015 22:28:22 +0100 Subject: [PATCH] Added sync protocol concept --- fl0w-protocol-concept.md | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 fl0w-protocol-concept.md diff --git a/fl0w-protocol-concept.md b/fl0w-protocol-concept.md new file mode 100644 index 0000000..981c920 --- /dev/null +++ b/fl0w-protocol-concept.md @@ -0,0 +1,47 @@ +# fl0w + +Client 1: +
+.
+
+ +Client 2: +
+.
+└── test.py (MD5: 7984fc60703f0e3801005e042bb13c86 | Timestamp: 1445794264)
+
+ +Server: +
+.
+└── test.py (MD5: 354dc351e940ef48b689d4d925532053 | Timestamp: 1445794100)
+
+ + + +> Time = 0 + +Client1: **Connect** +Client1: `{"auth" : {"user" : "test", "pw" : "123"}}` +Server > Client1: `{"auth" : 1}` +Client1: `{"sync" : []}` +Server > Client1: `{"sync" : ["test.py" : {"mtime" : 1445794100}]}` +Server > Client1: **test.py** + +> Time = 1 + +Client2: **Connect** +Client2: `{"auth" : {"user" : "test1", "pw" : "1233"}}` +Server > Client2: `{"auth" : 0}` +Client2: **Disconnects** + +> Time = 2 + +Client2: **Connect** +Client2: `{"auth" : {"user" : "test", "pw" : "123"}}` +Server > Client2: `{"auth" : 1}` +Client2: `{"sync" : ["test.py" : {"mtime" : 1445794264, "md5" : "7984fc60703f0e3801005e042bb13c86"}]}` +Server > Client2: `{"sync" : ["test.py"]}` +Client2: **test.py** +Server > Client1: `{"sync" : ["test.py" : {"mtime" : 1445794264}]}` +Server > Client1: **test.py** \ No newline at end of file