public class NettyUDPServer extends AbstractNettyServer
e.getChannel().write("Message", e.getRemoteAddress()).
Since it uses the same channel for all incoming connections, the handlers
cannot be modified refer to nabble
postServer.TRANSMISSION_PROTOCOL, Server.TransmissionProtocol| Modifier and Type | Field and Description |
|---|---|
private io.netty.bootstrap.Bootstrap |
bootstrap |
private static org.slf4j.Logger |
LOG |
ALL_CHANNELS, channelInitializer, gameAdminService, nettyConfig| Constructor and Description |
|---|
NettyUDPServer(NettyConfig nettyConfig,
io.netty.channel.ChannelInitializer<? extends io.netty.channel.Channel> channelInitializer) |
| Modifier and Type | Method and Description |
|---|---|
Server.TransmissionProtocol |
getTransmissionProtocol() |
void |
setChannelInitializer(io.netty.channel.ChannelInitializer<? extends io.netty.channel.Channel> initializer)
Method can be used to set the pipeline factory that is to be used by the
netty server.
|
void |
startServer() |
String |
toString() |
getBossGroup, getChannelInitializer, getGameAdminService, getNettyConfig, getSocketAddress, getWorkerGroup, setGameAdminService, startServer, startServer, stopServerprivate static final org.slf4j.Logger LOG
private io.netty.bootstrap.Bootstrap bootstrap
public NettyUDPServer(NettyConfig nettyConfig, io.netty.channel.ChannelInitializer<? extends io.netty.channel.Channel> channelInitializer)
public Server.TransmissionProtocol getTransmissionProtocol()
public String toString()
toString in class AbstractNettyServerpublic void setChannelInitializer(io.netty.channel.ChannelInitializer<? extends io.netty.channel.Channel> initializer)
NettyServerinitializer - The factory which will create a pipeline on each incoming
connection.Copyright © 2013. All Rights Reserved.