public class RaknetClient extends ReliableClient
org.cloudburstmc.netty:netty-transport-raknet as dependency.| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_ORDERING_CHANNELS |
bootstrap, channelFuture, channelInitializer| Constructor and Description |
|---|
RaknetClient(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> channelInitializer)
Create a new RakNet client.
|
RaknetClient(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> channelInitializer,
UDPChannelType channelType)
Create a new RakNet client.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureBootstrap()
Configure the bootstrap channel, event group and options.
|
UDPChannelType |
getChannelType() |
long |
getConnectTimeout() |
long |
getSessionTimeout() |
void |
setConnectTimeout(long connectTimeout)
Set the connect timeout in milliseconds.
|
void |
setSessionTimeout(long sessionTimeout)
Set the session timeout in milliseconds.
|
close, connect, connect, getBootstrap, getChannelFuturepublic static final int MAX_ORDERING_CHANNELS
public RaknetClient(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> channelInitializer)
channelInitializer - The channel initializer to usepublic RaknetClient(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> channelInitializer,
UDPChannelType channelType)
channelInitializer - The channel initializer to usechannelType - The channel type to usepublic UDPChannelType getChannelType()
public long getConnectTimeout()
public void setConnectTimeout(long connectTimeout)
connectTimeout - The connect timeoutpublic long getSessionTimeout()
public void setSessionTimeout(long sessionTimeout)
sessionTimeout - The session timeoutprotected void configureBootstrap()
ReliableClientconfigureBootstrap in class ReliableClient