2 Commits

Author SHA1 Message Date
af0ac0ff77 remove debug logs
All checks were successful
Linux arm64 / Build (push) Successful in 37s
2025-02-26 17:01:29 +01:00
375e0eddbd udp: bigger buffer 2025-02-26 17:00:44 +01:00
2 changed files with 1 additions and 3 deletions

View File

@@ -21,7 +21,6 @@ public abstract class Connexion implements PacketVisitor {
}
public void sendPacket(Packet packet) {
System.out.println("Sending " + packet);
try {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(stream);

View File

@@ -39,10 +39,9 @@ public class ClientConnexion extends Connexion {
private void readPackets() {
while (!Thread.interrupted()) {
try {
byte[] buffer = new byte[1024 * 10];
byte[] buffer = new byte[65535];
DatagramPacket dataPacket = new DatagramPacket(buffer, buffer.length);
this.socket.receive(dataPacket);
System.out.println(dataPacket.getLength());
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(dataPacket.getData()));
Packet packet = (Packet) ois.readObject();