mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-14 06:17:47 -04:00
chore(multiplayer): test NAT by fast method.
This commit is contained in:
parent
3ddab57ab5
commit
c32a14a959
@ -21,6 +21,7 @@ import com.jfoenix.controls.JFXButton;
|
|||||||
import com.jfoenix.controls.JFXDialogLayout;
|
import com.jfoenix.controls.JFXDialogLayout;
|
||||||
import de.javawi.jstun.test.DiscoveryInfo;
|
import de.javawi.jstun.test.DiscoveryInfo;
|
||||||
import de.javawi.jstun.test.DiscoveryTest;
|
import de.javawi.jstun.test.DiscoveryTest;
|
||||||
|
import de.javawi.jstun.test.FastDiscoveryTest;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.beans.property.*;
|
import javafx.beans.property.*;
|
||||||
import javafx.collections.FXCollections;
|
import javafx.collections.FXCollections;
|
||||||
@ -127,7 +128,7 @@ public class MultiplayerPage extends DecoratorAnimatedPage implements DecoratorP
|
|||||||
|
|
||||||
private void testNAT() {
|
private void testNAT() {
|
||||||
Task.supplyAsync(() -> {
|
Task.supplyAsync(() -> {
|
||||||
DiscoveryTest tester = new DiscoveryTest(null, 0, "stun.qq.com", 3478);
|
FastDiscoveryTest tester = new FastDiscoveryTest(null, 0, "stun.qq.com", 3478);
|
||||||
return tester.test();
|
return tester.test();
|
||||||
}).whenComplete(Schedulers.javafx(), (info, exception) -> {
|
}).whenComplete(Schedulers.javafx(), (info, exception) -> {
|
||||||
if (exception == null) {
|
if (exception == null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user