added getServerURI

This commit is contained in:
LAX1DUDE 2022-03-30 17:10:03 -07:00
parent d69742f10c
commit f7a4ddebd6
2 changed files with 8 additions and 0 deletions

View File

@ -16,8 +16,10 @@ import net.minecraft.src.Packet;
public class WebsocketNetworkManager implements INetworkManager { public class WebsocketNetworkManager implements INetworkManager {
private NetHandler netHandler; private NetHandler netHandler;
private String serverURI;
public WebsocketNetworkManager(String uri, String eagler, NetHandler netHandler) throws IOException { public WebsocketNetworkManager(String uri, String eagler, NetHandler netHandler) throws IOException {
this.serverURI = uri;
this.netHandler = netHandler; this.netHandler = netHandler;
if(!EaglerAdapter.startConnection(uri)) { if(!EaglerAdapter.startConnection(uri)) {
throw new IOException("websocket to "+uri+" failed"); throw new IOException("websocket to "+uri+" failed");
@ -137,4 +139,8 @@ public class WebsocketNetworkManager implements INetworkManager {
} }
} }
public String getServerURI() {
return this.serverURI;
}
} }

View File

@ -39,4 +39,6 @@ public interface INetworkManager {
public void networkShutdown(String var1, Object... var2); public void networkShutdown(String var1, Object... var2);
public void closeConnections(); public void closeConnections();
public String getServerURI();
} }