1package com.osroyale.net;
3import com.osroyale.Config;
4import com.osroyale.net.codec.login.LoginDecoder;
5import com.osroyale.net.codec.login.LoginResponseEncoder;
6import com.osroyale.net.session.Session;
7import io.netty.channel.ChannelInitializer;
8import io.netty.channel.ChannelPipeline;
9import io.netty.channel.socket.SocketChannel;
10import io.netty.handler.codec.haproxy.HAProxyMessageDecoder;
11import io.netty.handler.timeout.IdleStateHandler;
21 protected void initChannel(SocketChannel ch) {
22 final ChannelPipeline pipeline = ch.pipeline();
27 if (
Config.SUPPORT_HAPROXY) {
28 pipeline.addLast(
"haproxy",
new HAProxyMessageDecoder());
33 pipeline.addLast(
"login-encoder",
new LoginResponseEncoder());
static final AttributeKey< Session > SESSION_KEY
static final int IDLE_TIMEOUT