feat(multiplayer): more logs.
This commit is contained in:
@@ -92,6 +92,8 @@ public final class MultiplayerManager {
|
||||
throw new IllegalStateException("Cato file not found");
|
||||
}
|
||||
|
||||
LOG.info(String.format("Joining session (token=%s,version=%s,sessionName=%s,peer=%s,mode=%s,remotePort=%d,localPort=%d)", token, version, sessionName, peer, mode, remotePort, localPort));
|
||||
|
||||
return CompletableFuture.completedFuture(null).thenComposeAsync(unused -> {
|
||||
if (!isPortAvailable(3478)) {
|
||||
throw new CatoAlreadyStartedException();
|
||||
@@ -186,6 +188,8 @@ public final class MultiplayerManager {
|
||||
throw new CatoAlreadyStartedException();
|
||||
}
|
||||
|
||||
LOG.info(String.format("Creating session (token=%s,sessionName=%s,gamePort=%d)", token, sessionName, gamePort));
|
||||
|
||||
MultiplayerServer server = new MultiplayerServer(gamePort, allowAllJoinRequests);
|
||||
server.startServer();
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ public class MultiplayerPage extends DecoratorAnimatedPage implements DecoratorP
|
||||
|
||||
private void testNAT() {
|
||||
Task.supplyAsync(() -> {
|
||||
FastDiscoveryTest tester = new FastDiscoveryTest(null, 0, "stun.qq.com", 3478);
|
||||
FastDiscoveryTest tester = new FastDiscoveryTest(null, 0, "stun.stunprotocol.org", 3478);
|
||||
return tester.test();
|
||||
}).whenComplete(Schedulers.javafx(), (info, exception) -> {
|
||||
LOG.log(Level.INFO, "Nat test result " + MultiplayerPageSkin.getNATType(info), exception);
|
||||
|
||||
Reference in New Issue
Block a user