mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Implemented new client - server handshake protocol
- Implemented new packet types - Changed server & client logic to use new protocol Tags: #story[1124] (Issue 39)
This commit is contained in:
@@ -19,7 +19,9 @@ public enum PacketType {
|
||||
COURSE_WIND,
|
||||
AVG_WIND,
|
||||
BOAT_ACTION,
|
||||
OTHER;
|
||||
OTHER,
|
||||
RACE_REGISTRATION_REQUEST,
|
||||
RACE_REGISTRATION_RESPONSE;
|
||||
|
||||
public static PacketType assignPacketType(int packetType, byte[] payload){
|
||||
switch(packetType){
|
||||
@@ -56,6 +58,10 @@ public enum PacketType {
|
||||
return AVG_WIND;
|
||||
case 100:
|
||||
return BOAT_ACTION;
|
||||
case 101:
|
||||
return RACE_REGISTRATION_REQUEST;
|
||||
case 102:
|
||||
return RACE_REGISTRATION_RESPONSE;
|
||||
default:
|
||||
}
|
||||
return OTHER;
|
||||
|
||||
Reference in New Issue
Block a user