GameServerInitializer.java 575 Bytes
Newer Older
Melledy's avatar
Melledy committed
1
2
package emu.grasscutter.server.game;

3
import emu.grasscutter.netty.KcpServerInitializer;
Melledy's avatar
Melledy committed
4
5
6
import io.jpower.kcp.netty.UkcpChannel;
import io.netty.channel.ChannelPipeline;

7
public class GameServerInitializer extends KcpServerInitializer {
Melledy's avatar
Melledy committed
8
9
10
11
12
13
14
15
16
17
18
19
20
	private GameServer server;
	
	public GameServerInitializer(GameServer server) {
		this.server = server;
	}
	
    @Override
    protected void initChannel(UkcpChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();
        GameSession session = new GameSession(server);
        pipeline.addLast(session);
    }
}