12345678910111213141516171819 |
- package eu.tankernn.game.server;
- import io.netty.channel.ChannelHandlerContext;
- import io.netty.channel.ChannelInboundHandlerAdapter;
- public class GameServerHandler extends ChannelInboundHandlerAdapter {
- @Override
- public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
- ctx.write(msg);
- ctx.flush();
- }
- @Override
- public void exceptionCaught(ChannelHandlerContext ctx, Throwable e) throws Exception {
- e.printStackTrace();
- ctx.close();
- }
- }
|