Class TeaVMServerQuery
- java.lang.Object
-
- net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMServerQuery
-
- All Implemented Interfaces:
IServerQuery
public class TeaVMServerQuery extends java.lang.Object implements IServerQuery
Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.lax1dude.eaglercraft.v1_8.internal.IServerQuery
IServerQuery.QueryReadyState
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
accept
protected boolean
alive
static Logger
logger
protected boolean
open
protected long
pingStart
protected long
pingTimer
protected org.teavm.jso.websocket.WebSocket
sock
protected java.lang.String
uri
-
Fields inherited from interface net.lax1dude.eaglercraft.v1_8.internal.IServerQuery
defaultTimeout
-
-
Constructor Summary
Constructors Constructor Description TeaVMServerQuery(java.lang.String uri, java.lang.String accept)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
binaryResponsesAvailable()
void
close()
byte[]
getBinaryResponse()
EnumServerRateLimit
getRateLimit()
QueryResponse
getResponse()
protected void
initHandlers()
IServerQuery.QueryReadyState
readyState()
int
responsesAvailable()
void
send(byte[] bytes)
void
send(java.lang.String str)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.lax1dude.eaglercraft.v1_8.internal.IServerQuery
awaitResponse, awaitResponse, awaitResponseAvailable, awaitResponseAvailable, awaitResponseBinary, awaitResponseBinary, awaitResponseBinaryAvailable, awaitResponseBinaryAvailable, isClosed, isOpen, send
-
-
-
-
Field Detail
-
logger
public static final Logger logger
-
uri
protected final java.lang.String uri
-
accept
protected final java.lang.String accept
-
sock
protected final org.teavm.jso.websocket.WebSocket sock
-
open
protected boolean open
-
alive
protected boolean alive
-
pingStart
protected long pingStart
-
pingTimer
protected long pingTimer
-
-
Method Detail
-
initHandlers
protected void initHandlers()
-
send
public void send(java.lang.String str)
- Specified by:
send
in interfaceIServerQuery
-
send
public void send(byte[] bytes)
- Specified by:
send
in interfaceIServerQuery
-
responsesAvailable
public int responsesAvailable()
- Specified by:
responsesAvailable
in interfaceIServerQuery
-
getResponse
public QueryResponse getResponse()
- Specified by:
getResponse
in interfaceIServerQuery
-
binaryResponsesAvailable
public int binaryResponsesAvailable()
- Specified by:
binaryResponsesAvailable
in interfaceIServerQuery
-
getBinaryResponse
public byte[] getBinaryResponse()
- Specified by:
getBinaryResponse
in interfaceIServerQuery
-
readyState
public IServerQuery.QueryReadyState readyState()
- Specified by:
readyState
in interfaceIServerQuery
-
close
public void close()
- Specified by:
close
in interfaceIServerQuery
-
getRateLimit
public EnumServerRateLimit getRateLimit()
- Specified by:
getRateLimit
in interfaceIServerQuery
-
-