Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[SoulWorker]SoulWorker emu java

Initiate Mage
Joined
Oct 13, 2018
Messages
19
Reaction score
0
Hi everyone.I'am now trying to develop a emulator for a game called "SoulWorker".
And it is my very first time to develop a emulator,so,I got a problem.
I'm using Netty as my framework.
I create a login server as the following
Code:
EventLoopGroup bossGroup = new NioEventLoopGroup(); EventLoopGroup workerGroup = new NioEventLoopGroup();
ServerBootstrap b = new ServerBootstrap();            b.group(bossGroup, workerGroup).channel(NioServerSocketChannel.class)                    .childHandler(new ChannelInitializer<SocketChannel>() {                        @Override                        public void initChannel(SocketChannel ch) throws Exception {                            ch.pipeline().addLast(new DiscardServerHandler());                        }                    }).option(ChannelOption.SO_BACKLOG, 128)                    .childOption(ChannelOption.SO_KEEPALIVE, true)                    .childOption(ChannelOption.TCP_NODELAY, true);             ChannelFuture f = b.bind(LOGIN_SERVER_PORT).sync();            f.channel().closeFuture().sync();

And here is my handler:
Code:
public class DiscardServerHandler extends ChannelInboundHandlerAdapter {    @Override    public void channelActive(ChannelHandlerContext ctx) throws Exception {        // TODO Auto-generated method stub        System.out.println("connected");        super.channelActive(ctx);    }        @Override    public void channelRead(ChannelHandlerContext ctx, Object msg) { // (2)        System.out.println("reading");        if (!(msg instanceof ByteBuf)) return;        try {            System.out.println("read....");        } finally {            ReferenceCountUtil.release(msg);        }    }
}

So the problem is,after I launched my client.
the string "connected" is able to print to my console but,
I CAN NOT read anything.
String "reading" is never been printed to my console.

plz help me.



Ok I know my client isn't sent anything to server.
I don't know why but I guess if login info wasn't there the client would not send anything to server
 
Initiate Mage
Joined
Oct 13, 2018
Messages
19
Reaction score
0
tks for the reply
I've fixed this issue.The problem is there is an argument required so the client could get login infos.
 
Upvote 0
Back
Top