Grasscutter/src/main/java/emu/grasscutter/server/game/GameServerInitializer.java

21 lines
587 B
Java
Raw Normal View History

2022-04-17 12:43:07 +00:00
package emu.grasscutter.server.game;
import emu.grasscutter.netty.MihoyoKcpServerInitializer;
import io.jpower.kcp.netty.UkcpChannel;
import io.netty.channel.ChannelPipeline;
public class GameServerInitializer extends MihoyoKcpServerInitializer {
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);
}
}