public class RakNetServer<T extends com.nukkitx.network.NetworkSession<RakNetSession>> extends RakNet<T> implements com.nukkitx.network.NetworkListener
| Modifier and Type | Class and Description |
|---|---|
static class |
RakNetServer.Builder<T extends com.nukkitx.network.NetworkSession<RakNetSession>> |
| Constructor and Description |
|---|
RakNetServer(com.nukkitx.network.SessionManager<T> sessionManager,
RakNetPacketRegistry<T> registry,
com.nukkitx.network.SessionFactory<T,RakNetSession> factory,
InetSocketAddress address,
long serverId,
RakNetServerEventListener eventListener,
int maxThreads) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bind() |
static <T extends com.nukkitx.network.NetworkSession<RakNetSession>> |
builder() |
void |
close() |
void |
createSession(RakNetSession connection) |
InetSocketAddress |
getAddress() |
RakNetServerEventListener |
getEventListener() |
long |
getId() |
int |
getMaximumPlayers() |
protected void |
initPipeline(io.netty.channel.ChannelPipeline pipeline) |
void |
setMaximumPlayer(int maximumPlayers) |
getBootstrap, getChannel, getPacketRegistry, getSessionFactory, getSessionManager, initChannelchannelRegistered, exceptionCaught, handlerAddedchannelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerRemoved, isSharablepublic RakNetServer(com.nukkitx.network.SessionManager<T> sessionManager, RakNetPacketRegistry<T> registry, com.nukkitx.network.SessionFactory<T,RakNetSession> factory, InetSocketAddress address, long serverId, RakNetServerEventListener eventListener, int maxThreads)
public static <T extends com.nukkitx.network.NetworkSession<RakNetSession>> RakNetServer.Builder<T> builder()
public int getMaximumPlayers()
public void createSession(RakNetSession connection)
public void setMaximumPlayer(int maximumPlayers)
public RakNetServerEventListener getEventListener()
public long getId()
public boolean bind()
bind in interface com.nukkitx.network.NetworkListenerpublic void close()
close in interface com.nukkitx.network.NetworkListenerpublic InetSocketAddress getAddress()
getAddress in interface com.nukkitx.network.NetworkListenerprotected void initPipeline(io.netty.channel.ChannelPipeline pipeline)
throws Exception
initPipeline in class RakNet<T extends com.nukkitx.network.NetworkSession<RakNetSession>>ExceptionCopyright © 2018. All rights reserved.