public class LegacyPing extends ATCPPing
MCPingResponse| Modifier and Type | Class and Description |
|---|---|
static class |
LegacyPing.Version
The version of the legacy ping protocol.
|
ATCPPing.PacketReader, ATCPPing.PacketWriterconnectTimeout, protocolVersion, readTimeout, socketFactory| Constructor and Description |
|---|
LegacyPing(ITCPSocketFactory socketFactory,
int connectTimeout,
int readTimeout,
LegacyPing.Version version,
int protocolVersion) |
| Modifier and Type | Method and Description |
|---|---|
int |
getDefaultPort() |
void |
ping(ServerAddress serverAddress,
IStatusListener statusListener)
Ping the server and call the status listener.
|
protected void |
readPacket(MCInputStream is,
int packetId,
ATCPPing.PacketReader packetReader)
Read a packet from the input stream.
|
protected void |
writePacket(MCOutputStream os,
int packetId,
ATCPPing.PacketWriter packetWriter)
Write a packet to the output stream.
|
connect, prepareResponseprepareResponsepublic LegacyPing(ITCPSocketFactory socketFactory, int connectTimeout, int readTimeout, LegacyPing.Version version, int protocolVersion)
public int getDefaultPort()
getDefaultPort in class APingpublic void ping(ServerAddress serverAddress, IStatusListener statusListener)
APingprotected void writePacket(MCOutputStream os, int packetId, ATCPPing.PacketWriter packetWriter) throws java.io.IOException
ATCPPingwritePacket in class ATCPPingos - The output streampacketId - The packet idpacketWriter - The packet writerjava.io.IOException - If an I/O error occursprotected void readPacket(MCInputStream is, int packetId, ATCPPing.PacketReader packetReader) throws java.io.IOException
ATCPPingreadPacket in class ATCPPingis - The input streampacketId - The packet idpacketReader - The packet readerjava.io.IOException - If an I/O error occurs