public class SocketPing extends ATCPPing
SocketPingResponseATCPPing.PacketReader, ATCPPing.PacketWriterconnectTimeout, protocolVersion, readTimeout, socketFactory| Constructor and Description |
|---|
SocketPing(ITCPSocketFactory socketFactory,
int connectTimeout) |
| 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 SocketPing(ITCPSocketFactory socketFactory, int connectTimeout)
public int getDefaultPort()
getDefaultPort in class APingpublic void ping(ServerAddress serverAddress, IStatusListener statusListener)
APingprotected void writePacket(MCOutputStream os, int packetId, ATCPPing.PacketWriter packetWriter)
ATCPPingwritePacket in class ATCPPingos - The output streampacketId - The packet idpacketWriter - The packet writerprotected void readPacket(MCInputStream is, int packetId, ATCPPing.PacketReader packetReader)
ATCPPingreadPacket in class ATCPPingis - The input streampacketId - The packet idpacketReader - The packet reader