mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-08 14:57:30 +07:00
Changed signatures for packet processing calls from Channel to ChannelHandlerContext
This commit is contained in:
@ -4,8 +4,8 @@ import com.google.flatbuffers.FlatBufferBuilder;
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufUtil;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
@ -93,7 +93,7 @@ public class TestClient extends ApplicationAdapter implements PacketProcessor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processPacket(Channel ch, ByteBuf bb) {
|
||||
public void processPacket(ChannelHandlerContext ctx, ByteBuf bb) {
|
||||
Gdx.app.debug(TAG, "Processing packet...");
|
||||
Gdx.app.log(TAG, ByteBufUtil.hexDump(bb));
|
||||
}
|
||||
|
@ -3,8 +3,8 @@ package com.riiablo.net.reliable;
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufUtil;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
@ -81,7 +81,7 @@ public class TestServer extends ApplicationAdapter implements PacketProcessor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processPacket(Channel ch, ByteBuf bb) {
|
||||
public void processPacket(ChannelHandlerContext ctx, ByteBuf bb) {
|
||||
Gdx.app.debug(TAG, "Processing packet...");
|
||||
Gdx.app.log(TAG, ByteBufUtil.hexDump(bb));
|
||||
|
||||
|
@ -4,8 +4,8 @@ import com.google.flatbuffers.FlatBufferBuilder;
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufUtil;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
@ -95,7 +95,7 @@ public class TestClient extends ApplicationAdapter implements PacketProcessor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processPacket(Channel ch, ByteBuf bb) {
|
||||
public void processPacket(ChannelHandlerContext ctx, ByteBuf bb) {
|
||||
Gdx.app.debug(TAG, "Processing packet...");
|
||||
Gdx.app.log(TAG, ByteBufUtil.hexDump(bb));
|
||||
}
|
||||
|
@ -3,8 +3,8 @@ package com.riiablo.net.tcp;
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufUtil;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
@ -81,7 +81,7 @@ public class TestServer extends ApplicationAdapter implements PacketProcessor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processPacket(Channel ch, ByteBuf bb) {
|
||||
public void processPacket(ChannelHandlerContext ctx, ByteBuf bb) {
|
||||
Gdx.app.debug(TAG, "Processing packet...");
|
||||
Gdx.app.log(TAG, " " + ByteBufUtil.hexDump(bb));
|
||||
}
|
||||
|
Reference in New Issue
Block a user