From 1911c143eb1356aed9e83fbf89d4264835a41ccf Mon Sep 17 00:00:00 2001 From: Louis Date: Sun, 12 Jan 2020 22:04:15 +0100 Subject: [PATCH] Update documentation --- doc/classdiagram.xml | 2 +- doc/protocol.md | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 doc/protocol.md diff --git a/doc/classdiagram.xml b/doc/classdiagram.xml index e4d97ca..0cc7494 100644 --- a/doc/classdiagram.xml +++ b/doc/classdiagram.xml @@ -1 +1 @@ -7VrbcqM4EP0aV808eMoC48tj7Dg7u+tkU+Opnc2jAgpoI5BLyLE9X78SiJslG5LgeKeKFxdqXYz6tE4fGnr2PNz9xuA6uKUeIj1r4O169nXPsiajifiVhn1qGE6nqcFn2EtNoDCs8E+kjANl3WAPxZWBnFLC8bpqdGkUIZdXbJAxuq0Oe6Kk+q9r6CPNsHIh0a0/sMcDtS1rXNi/IuwH2T+DkdpfCLPBaidxAD26LZnsRc+eM0p5ehXu5ohI32V+SefdHOnNb4yhiDeZ8FfsPcD+H+HVnb+F883v8Mdk1bdG6ub4Ptsx8oQDVJMyHlCfRpAsCuuM0U3kIbnsQLSKMUtK18IIhPFfxPleoQk3nApTwEOietEO83/k9C+Oaj2Ueq53auWksc8aEWd7Ncl2MsNDYhgMJpmhmJy0KrPvEcMh4ojlRu9KhohoRjRCqeUGE6L6U9dIfxx1uTLFdMNcNWpPib/gnvttS/78vtg/Pn/Fy76jQhcyH/ETeIAiMsSJQlTcLtuLiQwRyPFL9Uagim0/H1fALy5UBJij4dRdvkCyUf+0QuxF+OswRuItDglMXPZEI56Fi0QQEuxH4toVPpKenon5HIsDdaU6uAySmRtg4i3hnm6kO2IO3eesNQsowz/FsjCLF9HNuIomEbHlESs5U+HFUCzG3GfwgAPTLdxVBi5hzJXBpYTAdYwf822EAikczSjnNKyEgwF9uUO0K5l0/FSvNVRksM9YTrW3BbeAkbIFJV7JbK1DPtYg18AmOAE65ow+5yQoffQkjsqcEsqKA5ShT9ATN2A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XZohPs1CvZoJD+TuSnapnlFf1R8JJNTtLjCNzF5dxkj+1TZoXmsqyQbdNPZYHDF3XXqYG++jblExA1zRdwVN9epwc0+tf/Dd9cVfeJYnpnjjHsOdDXsmevpyag3gue5c1/hpgfKvCKp7gWu2p96/3H1qJWWj5em61fJx/Tm7J6ZLx/T/YN2vfIxWy143DmOR9oZHbEGW3G4peQFcScRr1wQhfYHoR2WQGAV94Qgm8xSrL+QabqSFD1IrbHitbmuehA//6U5b0ZfuPvLH/2fAGP6Ew== \ No newline at end of file diff --git a/doc/protocol.md b/doc/protocol.md new file mode 100644 index 0000000..06d6a7f --- /dev/null +++ b/doc/protocol.md @@ -0,0 +1,11 @@ +# P2P-JAVA-PROJECT version 1 (Protocol for step 1) +All messages begins with `P2P-JAVA-PROJECT VERSION 1.0\n` (this version of the protocol). + +## Client messages +- `LIST\n`: ask the server to list files from server root directory +- `DOWNLOAD\n\n`: ask the server to download file from server root directory. Only one filename is allowed per request. + +## Server responses +- The response to `LIST` request is in the format `LIST\n\n\n[…]\n\n` +- The response to `DOWNLOAD` request is `LOAD \n` or `NOT FOUND\n` if the file doesn't exists. +- The server send a `PROTOCOL ERROR\n` message if it doesn't understands what the client sent.