mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
09c4f98056
- Implemented new packet types - Changed server & client logic to use new protocol Tags: #story[1124] (Issue 39)
23 lines
493 B
Java
23 lines
493 B
Java
package seng302.gameServer.server.messages;
|
|
|
|
|
|
public class RegistrationRequestMessage extends Message {
|
|
private static int MESSAGE_LENGTH = 2;
|
|
|
|
public RegistrationRequestMessage(ClientType type){
|
|
setHeader(new Header(MessageType.REGISTRATION_REQUEST, 1, (short) getSize()));
|
|
|
|
allocateBuffer();
|
|
writeHeaderToBuffer();
|
|
|
|
putInt(type.getCode(), 2);
|
|
|
|
writeCRC();
|
|
}
|
|
|
|
@Override
|
|
public int getSize() {
|
|
return MESSAGE_LENGTH;
|
|
}
|
|
}
|