This commit is contained in:
pixtaded 2025-06-24 15:16:53 +03:00
parent 6551cf5130
commit 83cd1def66

View File

@ -85,6 +85,16 @@ public class ServerThread implements Runnable {
return;
}
sendLogs(logPID[0]);
} case SERVER_INFO -> {
byte protocolVersion = CrabServer.RAC_VERSION;
String serverName = "CRAB";
byte[] nameBytes = serverName.getBytes(StandardCharsets.UTF_8);
byte[] response = new byte[1 + nameBytes.length];
response[0] = protocolVersion;
System.arraycopy(nameBytes, 0, response, 1, nameBytes.length);
respond(response);
} default -> System.out.println("PID not implemented: " + PID[0]);
}
socket.close();