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.Stringacceptprotected booleanalivestatic Loggerloggerprotected booleanopenprotected longpingStartprotected longpingTimerprotected org.teavm.jso.websocket.WebSocketsockprotected java.lang.Stringuri-
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 intbinaryResponsesAvailable()voidclose()byte[]getBinaryResponse()EnumServerRateLimitgetRateLimit()QueryResponsegetResponse()protected voidinitHandlers()IServerQuery.QueryReadyStatereadyState()intresponsesAvailable()voidsend(byte[] bytes)voidsend(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:
sendin interfaceIServerQuery
-
send
public void send(byte[] bytes)
- Specified by:
sendin interfaceIServerQuery
-
responsesAvailable
public int responsesAvailable()
- Specified by:
responsesAvailablein interfaceIServerQuery
-
getResponse
public QueryResponse getResponse()
- Specified by:
getResponsein interfaceIServerQuery
-
binaryResponsesAvailable
public int binaryResponsesAvailable()
- Specified by:
binaryResponsesAvailablein interfaceIServerQuery
-
getBinaryResponse
public byte[] getBinaryResponse()
- Specified by:
getBinaryResponsein interfaceIServerQuery
-
readyState
public IServerQuery.QueryReadyState readyState()
- Specified by:
readyStatein interfaceIServerQuery
-
close
public void close()
- Specified by:
closein interfaceIServerQuery
-
getRateLimit
public EnumServerRateLimit getRateLimit()
- Specified by:
getRateLimitin interfaceIServerQuery
-
-