java.lang.Object
org.glavo.rcon.Rcon
- 所有已实现的接口:
Closeable,AutoCloseable
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclose()Disconnect from the current serverSend a command to the servervoidConnect to a rcon servervoidconnect(SocketAddress address, byte[] password) Connect to a rcon servervoidDisconnect from the current serverintstatic voidvoidsetCharset(Charset charset) voidsetTimeout(int timeout)
-
字段详细资料
-
DEFAULT_PORT
public static final int DEFAULT_PORT- 另请参阅:
-
DEFAULT_CHARSET
-
-
构造器详细资料
-
Rcon
public Rcon() -
Rcon
-
Rcon
-
Rcon
-
Rcon
Create, connect and authenticate a new Rcon object- 参数:
host- Rcon server addressport- Rcon server portpassword- Rcon server password- 抛出:
IOExceptionAuthenticationException
-
-
方法详细资料
-
connect
public void connect(SocketAddress address, byte[] password) throws IOException, AuthenticationException Connect to a rcon server- 参数:
address- Rcon server addresspassword- Rcon server password- 抛出:
IOExceptionAuthenticationException- 从以下版本开始:
- 3.0
-
connect
public void connect(String host, int port, byte[] password) throws IOException, AuthenticationException Connect to a rcon server- 参数:
host- Rcon server addressport- Rcon server portpassword- Rcon server password- 抛出:
IOExceptionAuthenticationException
-
disconnect
Disconnect from the current server- 抛出:
IOException
-
close
Disconnect from the current server- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable- 抛出:
IOException- 另请参阅:
-
command
Send a command to the server- 参数:
payload- The command to send- 返回:
- The payload of the response
- 抛出:
IOException
-
getRequestId
public int getRequestId() -
getSocket
-
getCharset
-
setCharset
-
setTimeout
public void setTimeout(int timeout) - 从以下版本开始:
- 3.0
-
main
-