Fixed server discovery

This commit is contained in:
Anuken
2018-01-19 19:11:14 -05:00
parent b1a38c3e61
commit 49aef2bf99
5 changed files with 48 additions and 66 deletions

View File

@@ -28,7 +28,7 @@ public class WebsocketClient implements ClientProvider {
@Override
public void connect(String ip, int port) throws IOException {
socket = new Websocket("ws://" + ip + ":" + Vars.webPort);
socket = new Websocket("wss://" + ip + ":" + Vars.webPort);
socket.addListener(new WebsocketListener() {
public void onMessage(byte[] bytes) {
try {
@@ -105,7 +105,7 @@ public class WebsocketClient implements ClientProvider {
@Override
public void pingHost(String address, int port, Consumer<Host> valid, Consumer<IOException> failed) {
failed.accept(new IOException());
Websocket socket = new Websocket("ws://" + address + ":" + Vars.webPort);
Websocket socket = new Websocket("wss://" + address + ":" + Vars.webPort);
final boolean[] accepted = {false};
socket.addListener(new WebsocketListener() {
@Override