Brett 2023-04-15 21:17:31 -04:00
parent 0a03b1f913
commit 49a78142d5
2 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ public class Client implements Runnable {
} }
private void sendMessage(Message.Sent message){ private void sendMessage(Message.Sent message){
if (message.getMessageID() != PacketTable.ACK) if (message.getPacketID() != PacketTable.ACK)
sentMessages.put(message.getMessageID(), message); sentMessages.put(message.getMessageID(), message);
byte[] data = message.getData().toByteArray(); byte[] data = message.getData().toByteArray();
DatagramPacket sendPacket = new DatagramPacket(data, data.length, serverAddress, Server.SERVER_PORT); DatagramPacket sendPacket = new DatagramPacket(data, data.length, serverAddress, Server.SERVER_PORT);

View File

@ -176,7 +176,7 @@ public class Server implements Runnable {
} }
public void sendMessage(Message.Sent message){ public void sendMessage(Message.Sent message){
if (message.getMessageID() != PacketTable.ACK) if (message.getPacketID() != PacketTable.ACK)
this.sentMessages.put(message.getMessageID(), message); this.sentMessages.put(message.getMessageID(), message);
byte[] data = message.getData().toByteArray(); byte[] data = message.getData().toByteArray();
if (data.length > PACKET_SIZE) if (data.length > PACKET_SIZE)