added getServerURI
This commit is contained in:
parent
d69742f10c
commit
f7a4ddebd6
|
@ -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");
|
||||||
|
@ -136,5 +138,9 @@ public class WebsocketNetworkManager implements INetworkManager {
|
||||||
EaglerAdapter.setDebugVar("minecraftServer", "null");
|
EaglerAdapter.setDebugVar("minecraftServer", "null");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getServerURI() {
|
||||||
|
return this.serverURI;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user