public class NetworkDispatcher extends io.netty.channel.SimpleChannelInboundHandler<Packet> implements io.netty.channel.ChannelOutboundHandler
| Modifier and Type | Field and Description |
|---|---|
static io.netty.util.AttributeKey<NetworkDispatcher> |
FML_DISPATCHER |
static io.netty.util.AttributeKey<java.lang.Boolean> |
IS_LOCAL |
NetworkManager |
manager |
| Constructor and Description |
|---|
NetworkDispatcher(NetworkManager manager) |
NetworkDispatcher(NetworkManager manager,
ServerConfigurationManager scm) |
| Modifier and Type | Method and Description |
|---|---|
void |
abortClientHandshake(java.lang.String type) |
static NetworkDispatcher |
allocAndSet(NetworkManager manager) |
static NetworkDispatcher |
allocAndSet(NetworkManager manager,
ServerConfigurationManager scm) |
void |
bind(io.netty.channel.ChannelHandlerContext ctx,
java.net.SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Packet msg) |
void |
clientToServerHandshake() |
void |
close(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
completeClientHandshake() |
void |
completeHandshake(Side target) |
void |
connect(io.netty.channel.ChannelHandlerContext ctx,
java.net.SocketAddress remoteAddress,
java.net.SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
void |
deregister(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
Deprecated.
|
void |
disconnect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause) |
void |
flush(io.netty.channel.ChannelHandlerContext ctx) |
static NetworkDispatcher |
get(NetworkManager manager) |
INetHandler |
getNetHandler() |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
read(io.netty.channel.ChannelHandlerContext ctx) |
void |
rejectHandshake(java.lang.String result) |
void |
sendProxy(FMLProxyPacket msg) |
void |
serverToClientHandshake(EntityPlayerMP player) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise) |
acceptInboundMessage, channelReadchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedpublic static final io.netty.util.AttributeKey<NetworkDispatcher> FML_DISPATCHER
public static final io.netty.util.AttributeKey<java.lang.Boolean> IS_LOCAL
public final NetworkManager manager
public NetworkDispatcher(NetworkManager manager)
public NetworkDispatcher(NetworkManager manager, ServerConfigurationManager scm)
public static NetworkDispatcher get(NetworkManager manager)
public static NetworkDispatcher allocAndSet(NetworkManager manager)
public static NetworkDispatcher allocAndSet(NetworkManager manager, ServerConfigurationManager scm)
public void serverToClientHandshake(EntityPlayerMP player)
public void clientToServerHandshake()
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterjava.lang.Exceptionprotected void channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Packet msg)
throws java.lang.Exception
channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<Packet>java.lang.Exceptionpublic INetHandler getNetHandler()
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt)
throws java.lang.Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionpublic void sendProxy(FMLProxyPacket msg)
public void rejectHandshake(java.lang.String result)
public void bind(io.netty.channel.ChannelHandlerContext ctx,
java.net.SocketAddress localAddress,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
bind in interface io.netty.channel.ChannelOutboundHandlerjava.lang.Exceptionpublic void connect(io.netty.channel.ChannelHandlerContext ctx,
java.net.SocketAddress remoteAddress,
java.net.SocketAddress localAddress,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
connect in interface io.netty.channel.ChannelOutboundHandlerjava.lang.Exceptionpublic void disconnect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
disconnect in interface io.netty.channel.ChannelOutboundHandlerjava.lang.Exceptionpublic void close(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
close in interface io.netty.channel.ChannelOutboundHandlerjava.lang.Exception@Deprecated
public void deregister(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
deregister in interface io.netty.channel.ChannelOutboundHandlerjava.lang.Exceptionpublic void read(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
read in interface io.netty.channel.ChannelOutboundHandlerjava.lang.Exceptionpublic void write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
write in interface io.netty.channel.ChannelOutboundHandlerjava.lang.Exceptionpublic void flush(io.netty.channel.ChannelHandlerContext ctx)
throws java.lang.Exception
flush in interface io.netty.channel.ChannelOutboundHandlerjava.lang.Exceptionpublic void completeHandshake(Side target)
public void completeClientHandshake()
public void abortClientHandshake(java.lang.String type)
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Throwable cause)
throws java.lang.Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exception