Added LISTL command to Protocol.java and in JServerProtocolParser.java. currently it is only logged THAt it was reached and parsed, but no functionality is attached.
This commit is contained in:
parent
ae61da0607
commit
be2c8d6698
@ -62,6 +62,13 @@ public class Protocol {
|
||||
*/
|
||||
public static final String createNewGame = "CRTGM";
|
||||
|
||||
/**
|
||||
* TODO: implement in {@link ch.unibas.dmi.dbis.cs108.multiplayer.client.MessageFormatter}
|
||||
* TODO: imlement in {@link ch.unibas.dmi.dbis.cs108.multiplayer.server.JServerProtocolParser}
|
||||
* Represents a clients request for a list of lobbies
|
||||
*/
|
||||
public static final String listLobbies = "LISTL";
|
||||
|
||||
//SERVER TO CLIENT COMMANDS
|
||||
|
||||
/**
|
||||
|
||||
@ -18,9 +18,9 @@ public class JServerProtocolParser {
|
||||
|
||||
|
||||
/**
|
||||
* Used by the server (i.e. ClientHandler{@link ClientHandler}) to parse an incoming protocol message. For
|
||||
* documentation on the individual Protocol messages, view the Protocol.java class or hover over
|
||||
* the commands (e.g. Protocol.chatMsgToAll) with your mouse in this class.
|
||||
* Used by the server (i.e. ClientHandler{@link ClientHandler}) to parse an incoming protocol
|
||||
* message. For documentation on the individual Protocol messages, view the Protocol.java class or
|
||||
* hover over the commands (e.g. Protocol.chatMsgToAll) with your mouse in this class.
|
||||
*
|
||||
* @param msg the encoded message that needs to be parsed
|
||||
* @param h this ClientHandler (required so this method can access the ClientHandler's methods)
|
||||
@ -63,6 +63,10 @@ public class JServerProtocolParser {
|
||||
+ " command reached in JServerProtocolParser. Command issued by: "
|
||||
+ h.getClientUserName());
|
||||
break;
|
||||
case Protocol.listLobbies:
|
||||
//TODO: add action
|
||||
LOGGER.debug(Protocol.listLobbies + " command recieved from: " + h.getClientUserName());
|
||||
break;
|
||||
default:
|
||||
System.out.println("Received unknown command");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user