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 String[] |
args |
private org.jboss.netty.channel.FixedReceiveBufferSizePredictorFactory |
bufferSizePredictor |
private org.jboss.netty.channel.Channel |
channel
The connected channel for this server.
|
private static org.slf4j.Logger |
LOG |
ALL_CHANNELS, gameAdminService, pipelineFactory, portNumber, serverBootstrap, session, socketAddress
Constructor and Description |
---|
NettyUDPServer() |
Modifier and Type | Method and Description |
---|---|
org.jboss.netty.bootstrap.Bootstrap |
createServerBootstrap()
Creates a
ServerBootstrap object which is used to start a server. |
String[] |
getArgs() |
org.jboss.netty.channel.FixedReceiveBufferSizePredictorFactory |
getBufferSizePredictor() |
Server.TransmissionProtocol |
getTransmissionProtocol() |
void |
setArgs(String[] args) |
void |
setBufferSizePredictor(org.jboss.netty.channel.FixedReceiveBufferSizePredictorFactory bufferSizePredictor) |
void |
startServer() |
void |
startServer(InetSocketAddress socketAddress) |
void |
startServer(int port) |
void |
startServer(String[] args) |
void |
stopServer() |
String |
toString() |
configureServerBootStrap, getGameAdminService, getPipelineFactory, getPortNumber, getPortNumber, getServerBootstrap, getSession, getSocketAddress, setGameAdminService, setInetAddress, setPipelineFactory, setPortNumber, setServerBootstrap, setSession
private static final org.slf4j.Logger LOG
private org.jboss.netty.channel.FixedReceiveBufferSizePredictorFactory bufferSizePredictor
private String[] args
private org.jboss.netty.channel.Channel channel
public org.jboss.netty.bootstrap.Bootstrap createServerBootstrap()
NettyServer
ServerBootstrap
object which is used to start a server.ServerBootstrap
.public void stopServer() throws Exception
stopServer
in interface Server
stopServer
in class AbstractNettyServer
Exception
public org.jboss.netty.channel.FixedReceiveBufferSizePredictorFactory getBufferSizePredictor()
public void setBufferSizePredictor(org.jboss.netty.channel.FixedReceiveBufferSizePredictorFactory bufferSizePredictor)
public Server.TransmissionProtocol getTransmissionProtocol()
public void startServer(InetSocketAddress socketAddress)
public String[] getArgs()
public void setArgs(String[] args)
public String toString()
toString
in class AbstractNettyServer
Copyright © 2013. All Rights Reserved.