public class ClassicPing extends ATCPPing
ClassicPingResponse| Modifier and Type | Class and Description |
|---|---|
static class |
ClassicPing.Version
The different versions of the classic protocol.
|
ATCPPing.PacketReader, ATCPPing.PacketWriter| Modifier and Type | Field and Description |
|---|---|
static char[] |
CP437
The CP437 character set used by the classic editions.
|
connectTimeout, protocolVersion, readTimeout, socketFactory| Constructor and Description |
|---|
ClassicPing(ITCPSocketFactory socketFactory,
int connectTimeout,
int readTimeout,
ClassicPing.Version version) |
| 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.
|
close, connect, prepareResponseprepareResponsepublic static final char[] CP437
public ClassicPing(ITCPSocketFactory socketFactory, int connectTimeout, int readTimeout, ClassicPing.Version version)
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