Packet sending during Netty migration
This commit is contained in:
@@ -11,11 +11,11 @@ public class LoginServerInitializer extends ServerChannelInitializer {
|
||||
|
||||
@Override
|
||||
public void initChannel(SocketChannel socketChannel) {
|
||||
final String clientIp = socketChannel.remoteAddress().getHostName();
|
||||
final String clientIp = socketChannel.remoteAddress().getHostString();
|
||||
log.debug("Client connected to login server from {} ", clientIp);
|
||||
|
||||
PacketProcessor packetProcessor = PacketProcessor.getLoginServerProcessor();
|
||||
final MapleClient client = new MapleClient(packetProcessor, LoginServer.WORLD, LoginServer.CHANNEL);
|
||||
final MapleClient client = new MapleClient(packetProcessor, LoginServer.WORLD_ID, LoginServer.CHANNEL_ID);
|
||||
client.setSessionId(sessionId.getAndIncrement());
|
||||
|
||||
initPipeline(socketChannel, client);
|
||||
|
||||
@@ -12,6 +12,11 @@ import java.awt.*;
|
||||
public class ByteBufOutPacket implements OutPacket {
|
||||
private final ByteBuf byteBuf;
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public ByteBufOutPacket() {
|
||||
this.byteBuf = Unpooled.buffer();
|
||||
}
|
||||
|
||||
public ByteBufOutPacket(SendOpcode op) {
|
||||
ByteBuf byteBuf = Unpooled.buffer();
|
||||
byteBuf.writeShortLE((short) op.getValue());
|
||||
|
||||
Reference in New Issue
Block a user