All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.neko233.socket233.impl.tcp.pipeline.TcpChannelInitializer Maven / Gradle / Ivy

The newest version!
package com.neko233.socket233.impl.tcp.pipeline;

import com.neko233.socket233.core.NetworkEngine;
import com.neko233.socket233.impl.tcp.handler.TcpTransportLayerHandlerAdapter;
import com.neko233.socket233.netty.api.AbstractEngineChannelInitializer;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import org.jetbrains.annotations.NotNull;

/**
 * @author SolarisNeko
 * Date on 2022-12-16
 */
public class TcpChannelInitializer extends AbstractEngineChannelInitializer {

    public TcpChannelInitializer(@NotNull NetworkEngine networkEngine) {
        super(networkEngine);
    }

    @Override
    protected void initChannel(Channel channel) throws Exception {

        channel.pipeline()
                .addLast(new TcpTransportLayerHandlerAdapter(this.getNetworkEngine()))
        ;
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy