[FEATURE] Поддержка указания кастомной магии лаунчера сашка

This commit is contained in:
Gravit 2019-03-23 11:30:47 +07:00
parent 255dd6bd56
commit 4fe0bf4195
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
3 changed files with 4 additions and 2 deletions

View file

@ -52,7 +52,7 @@ private Handshake readHandshake(HInput input, HOutput output) throws IOException
if (magicNumber == Launcher.PROTOCOL_MAGIC_LEGACY - 1) { // Previous launcher protocol if (magicNumber == Launcher.PROTOCOL_MAGIC_LEGACY - 1) { // Previous launcher protocol
session = 0; session = 0;
legacy = true; legacy = true;
} else if (magicNumber == Launcher.PROTOCOL_MAGIC_LEGACY - 2) { // Previous launcher protocol } else if (magicNumber == ServerSocketHandler.LEGACY_LAUNCHER_MAGIC) { // Previous launcher protocol
session = 0; session = 0;
legacy = true; legacy = true;
} else if (magicNumber == Launcher.PROTOCOL_MAGIC_LEGACY) { } else if (magicNumber == Launcher.PROTOCOL_MAGIC_LEGACY) {

View file

@ -1,5 +1,6 @@
package ru.gravit.launchserver.socket; package ru.gravit.launchserver.socket;
import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.managers.GarbageManager; import ru.gravit.launcher.managers.GarbageManager;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.manangers.SessionManager; import ru.gravit.launchserver.manangers.SessionManager;
@ -37,6 +38,7 @@ public interface Listener {
public final SessionManager sessionManager; public final SessionManager sessionManager;
private final AtomicLong idCounter = new AtomicLong(0L); private final AtomicLong idCounter = new AtomicLong(0L);
public static int LEGACY_LAUNCHER_MAGIC = Launcher.PROTOCOL_MAGIC_LEGACY - 2;
private volatile Listener listener; private volatile Listener listener;

@ -1 +1 @@
Subproject commit 073b52f785527e01ca548fc56b71130b41ce648e Subproject commit 0e32128c6c8f569d67eff4e94777c6b8ef696345