@@ -0,0 +1,2894 @@
+package com.nestedworld.nestedworld.network.socket.implementation;%0A%0Aimport com.nestedworld.nestedworld.helpers.bimap.BiMap;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Apublic class SocketMessageType %7B%0A%0A    //Enum use for listing every message (send & response)%0A    public enum MessageKind %7B%0A        //Server side message%0A        TYPE_CHAT_USER_JOINED,%0A        TYPE_CHAT_USER_PARTED,%0A        TYPE_CHAT_MESSAGE_RECEIVED,%0A        TYPE_COMBAT_START,%0A        TYPE_COMBAT_AVAILABLE,%0A        TYPE_COMBAT_MONSTER_KO,%0A        TYPE_COMBAT_ATTACK_RECEIVED,%0A        TYPE_COMBAT_MONSTER_REPLACED,%0A        TYPE_COMBAT_END,%0A        TYPE_GEO_PLACES_CAPTURED,%0A%0A        //Client side message%0A        TYPE_AUTHENTICATE,%0A        TYPE_CHAT_JOIN_CHANNEL,%0A        TYPE_CHAT_PART_CHANNEL,%0A        TYPE_CHAT_SEND_MESSAGE,%0A        TYPE_COMBAT_SEND_ATTACK,%0A        TYPE_COMBAT_MONSTER_KO_CAPTURE,%0A        TYPE_COMBAT_MONSTER_KO_REPLACE,%0A        TYPE_COMBAT_FLEE%0A    %7D%0A%0A    public static final BiMap%3CMessageKind, String%3E messageType = new BiMap%3CMessageKind, String%3E()%7B%0A        %7B%0A            /*%0A            ** Spontaneous message (server side)%0A            ** Key = request.type%0A            ** -%3E we'll use the key for message parsing%0A             */%0A            //Chat%0A            put(MessageKind.TYPE_CHAT_USER_JOINED, %22chat:user-joined%22);%0A            put(MessageKind.TYPE_CHAT_USER_PARTED, %22chat:user-parted%22);%0A            put(MessageKind.TYPE_CHAT_MESSAGE_RECEIVED, %22chat:message-received%22);%0A%0A            //Combat%0A            put(MessageKind.TYPE_COMBAT_START, %22combat:start%22);%0A            put(MessageKind.TYPE_COMBAT_AVAILABLE, %22combat:available%22);%0A            put(MessageKind.TYPE_COMBAT_MONSTER_KO, %22combat:monster-ko%22);%0A            put(MessageKind.TYPE_COMBAT_ATTACK_RECEIVED, %22combat:attack-received%22);%0A            put(MessageKind.TYPE_COMBAT_MONSTER_REPLACED, %22combat:monster-replaced%22);%0A            put(MessageKind.TYPE_COMBAT_END, %22combat:end%22);%0A%0A            //Geo%0A            put(MessageKind.TYPE_GEO_PLACES_CAPTURED, %22geo:places:place-captured%22);%0A%0A            /*%0A            ** Message send by app (client)%0A            ** Value = request.dd%0A            ** -%3E we'll use the value to parse some response%0A             */%0A            //Auth%0A            put(MessageKind.TYPE_AUTHENTICATE, %22authenticate%22);%0A%0A            //Chat%0A            put(MessageKind.TYPE_CHAT_JOIN_CHANNEL, %22chat:join-channel%22);%0A            put(MessageKind.TYPE_CHAT_PART_CHANNEL, %22chat:part-channel%22);%0A            put(MessageKind.TYPE_GEO_PLACES_CAPTURED, %22chat:send-message%22);%0A%0A            //Combat%0A            put(MessageKind.TYPE_COMBAT_SEND_ATTACK, %22combat:send-attack%22);%0A            put(MessageKind.TYPE_COMBAT_MONSTER_KO_CAPTURE, %22combat:monster-ko:capture%22);%0A            put(MessageKind.TYPE_COMBAT_MONSTER_KO_REPLACE, %22combat:monster-ko:replace%22);%0A            put(MessageKind.TYPE_COMBAT_FLEE, %22combat:flee%22);%0A        %7D%0A    %7D;%0A%7D%0A

create new data dataStructure for socket parsing improvement