Changed signatures for packet processing calls from Channel to ChannelHandlerContext

This commit is contained in:
Collin Smith
2020-06-25 17:29:20 -07:00
parent 57a8c1167e
commit dac10467fa
12 changed files with 27 additions and 27 deletions

View File

@ -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));
}

View File

@ -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));

View File

@ -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));
}

View File

@ -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));
}