You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
727 B
727 B
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 directoryDOWNLOAD\n<FILENAME>\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 formatLIST\n<FILENAME 1>\n<FILENAME 2>\n[…]<LAST FILENAME>\n\n
- The response to
DOWNLOAD
request isLOAD <FILESIZE (BYTES)>\n<CONTENT OF FILE>
orNOT 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.