main
parent
0a03b1f913
commit
49a78142d5
|
@ -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);
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue