mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Upon hosting, and then creating a new instance and connecting to that IP, button transmissions work and print out on server!! :D
Took the send method out of the Message class as it didnt make sense to have it there. This meant taking it out of all subclasses too tags: #story[1055] pair[wmu16, zyt10]
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
package seng302.server.messages;
|
||||
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.channels.Channels;
|
||||
import java.nio.channels.SocketChannel;
|
||||
import java.nio.channels.WritableByteChannel;
|
||||
import java.io.OutputStream;
|
||||
|
||||
public class MarkRoundingMessage extends Message{
|
||||
private final long MESSAGE_VERSION_NUMBER = 1;
|
||||
@@ -33,15 +30,6 @@ public class MarkRoundingMessage extends Message{
|
||||
this.markId = markId;
|
||||
|
||||
setHeader(new Header(MessageType.MARK_ROUNDING, 1, (short) getSize()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return MESSAGE_SIZE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(SocketChannel outputStream) throws IOException {
|
||||
allocateBuffer();
|
||||
writeHeaderToBuffer();
|
||||
|
||||
@@ -56,7 +44,10 @@ public class MarkRoundingMessage extends Message{
|
||||
|
||||
writeCRC();
|
||||
rewind();
|
||||
}
|
||||
|
||||
outputStream.write(getBuffer());
|
||||
@Override
|
||||
public int getSize() {
|
||||
return MESSAGE_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user