Class NetworkServer
java.lang.Object
org.geysermc.mcprotocollib.network.server.AbstractServer
org.geysermc.mcprotocollib.network.server.NetworkServer
- All Implemented Interfaces:
Server
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkServer(SocketAddress bindAddress, Supplier<? extends PacketProtocol> protocol) NetworkServer(SocketAddress bindAddress, Supplier<? extends PacketProtocol> protocol, Supplier<Executor> packetHandlerExecutorFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprotected io.netty.channel.EventLoopGroupprotected io.netty.channel.EventLoopGroupprotected io.netty.channel.ChannelFactory<? extends io.netty.channel.ServerChannel>protected io.netty.channel.ChannelHandlerbooleanReturns true if the listener is listening.protected voidsetOptions(io.netty.bootstrap.ServerBootstrap bootstrap) Methods inherited from class org.geysermc.mcprotocollib.network.server.AbstractServer
addListener, addSession, bind, bind, bind, callEvent, close, close, close, createPacketProtocol, getBindAddress, getGlobalFlags, getGlobalFlagSupplied, getListeners, getPacketProtocol, getSessions, hasGlobalFlag, removeListener, removeSession, setGlobalFlagMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.mcprotocollib.network.Server
getGlobalFlag, getGlobalFlag
-
Constructor Details
-
NetworkServer
-
NetworkServer
public NetworkServer(SocketAddress bindAddress, Supplier<? extends PacketProtocol> protocol, Supplier<Executor> packetHandlerExecutorFactory)
-
-
Method Details
-
isListening
public boolean isListening()Description copied from interface:ServerReturns true if the listener is listening.- Returns:
- True if the listener is listening.
-
bindImpl
- Specified by:
bindImplin classAbstractServer
-
getChannelFactory
protected io.netty.channel.ChannelFactory<? extends io.netty.channel.ServerChannel> getChannelFactory() -
createBossEventLoopGroup
protected io.netty.channel.EventLoopGroup createBossEventLoopGroup() -
createWorkerEventLoopGroup
protected io.netty.channel.EventLoopGroup createWorkerEventLoopGroup() -
setOptions
protected void setOptions(io.netty.bootstrap.ServerBootstrap bootstrap) -
getChannelHandler
protected io.netty.channel.ChannelHandler getChannelHandler() -
closeImpl
- Specified by:
closeImplin classAbstractServer
-