Class MCPing
java.lang.Object
com.zenith.feature.queue.mcping.MCPing
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MCPingstatic final intIf the client is pinging to determine what version to use, by convention -1 should be set. -
Method Summary
Modifier and TypeMethodDescriptionintgetProtocolVersion(String hostname, int port, int timeout, boolean resolveDns) resolveAddress(String hostname, int defaultPort)
-
Field Details
-
INSTANCE
-
PROTOCOL_VERSION_DISCOVERY
public static final int PROTOCOL_VERSION_DISCOVERYIf the client is pinging to determine what version to use, by convention -1 should be set.- See Also:
-
-
Method Details
-
getProtocolVersion
public int getProtocolVersion(String hostname, int port, int timeout, boolean resolveDns) throws IOException - Throws:
IOException
-
ping
public MCResponse ping(String hostname, int port, int timeout, boolean resolveDns) throws IOException - Throws:
IOException
-
resolveAddress
-
parsePing
-