From 66d3826509b57ac79fcbed5251f46a6e69ac7035 Mon Sep 17 00:00:00 2001 From: Mathis Ginkel Date: Sat, 11 Apr 2026 11:16:21 +0200 Subject: [PATCH] Docs: Delete outdated network protocol document --- .../Network-Protocol-Documentation.md | 63 ------------------- .../check_nick/UsernameAvailability.java | 6 +- 2 files changed, 2 insertions(+), 67 deletions(-) delete mode 100644 documents/docs/networking/Network-Protocol-Documentation.md diff --git a/documents/docs/networking/Network-Protocol-Documentation.md b/documents/docs/networking/Network-Protocol-Documentation.md deleted file mode 100644 index 7099c7e..0000000 --- a/documents/docs/networking/Network-Protocol-Documentation.md +++ /dev/null @@ -1,63 +0,0 @@ -This Document states the Network-Protocol as it is currently implemented - -## GET_MESSAGE_COUNT -This Command gets the number of messages, currently stored in the queue for the specific client. -(Is used together with GET_NEXT_MESSAGE, to get all messages that are currently in the queue) - -Example: - -``` -GET_MESSAGE_COUNT - -1 -+OK -``` - -## GET_NEXT_MESSAGE -This Command gets the next Message that is being stored in the queue for the client. -(Command is being sent the amount of times, the GET_MESSAGE_COUNT Command returns) - -Example: - -``` -GET_NEXT_MESSAGE - -TYPE=LOBBY GAME=1 USER=player1 TARGET=null TIME=9:30 TEXT="Guten Tag" -+OK -``` - -## SEND_MESSAGE -This Command gets sent if the user of that client writes a message to one of the three possible chats - -(The Arguments / Parameters of the Command describe all the parameters of the Object "Message" being used internally by both the Client and the Server) - -Example: -``` -SEND_MESSAGE TYPE=LOBBY GAME=1 USER=player1 TARGET=null TIME=10:30 TEXT="Hallo Welt" - -+OK -``` - -## LOG_IN -This Command is used to create a user on the server and associate that user with a username -Server returns the username, slightly changed if it is already used by someone else, and an ID to identify the client. - -Example: - -``` -LOG_IN USERNAME="Peter" - -USERNAME="Peter" ID= -+OK -``` - -## LOG_OUT -This Command is used to quit the connection between client and server. - -Example: - -``` -LOG_OUT - -+OK -``` diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/check_nick/UsernameAvailability.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/check_nick/UsernameAvailability.java index c728971..40974bd 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/check_nick/UsernameAvailability.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/server/app/commands/check_nick/UsernameAvailability.java @@ -1,10 +1,8 @@ package ch.unibas.dmi.dbis.cs108.casono.server.app.commands.check_nick; - /** Represents the availability status of a username */ -public enum UsernameAvailability { +enum UsernameAvailability { /** Username is available */ FREE, - /** Username is already in use */ TAKEN -} +} \ No newline at end of file