// Path: kcp-example/src/main/java/io/jpower/kcp/example/echo/EchoServerHandler.java
// public class EchoServerHandler extends ChannelInboundHandlerAdapter {
// 
//     @Override
//     public void channelActive(ChannelHandlerContext ctx) throws Exception {
//         UkcpChannel kcpCh = (UkcpChannel) ctx.channel();
//         kcpCh.conv(EchoServer.CONV);
//     }
// 
//     @Override
//     public void channelRead(ChannelHandlerContext ctx, Object msg) {
//         ctx.write(msg);
//     }
// 
//     @Override
//     public void channelReadComplete(ChannelHandlerContext ctx) {
//         ctx.flush();
//     }
// 
//     @Override
//     public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
//         // Close the connection when an exception is raised.
//         cause.printStackTrace();
//         ctx.close();
//     }
// 
// }
// 
// Path: kcp-netty/src/main/java/io/jpower/kcp/netty/UkcpChannel.java
// public interface UkcpChannel extends Channel {
// 
//     int conv();
// 
//     @Override
//     UkcpChannelConfig config();
// 
//     UkcpChannel conv(int conv);
// 
//     @Override
//     InetSocketAddress localAddress();
// 
//     @Override
//     InetSocketAddress remoteAddress();
// 
// }


import io.jpower.kcp.example.echo.EchoServerHandler;
import io.jpower.kcp.netty.UkcpChannel;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package io.jpower.kcp.example.rtt;


/**
 * @author <a href="mailto:szhnet@gmail.com">szh</a>
 */
public class KcpRttServerHandler extends ChannelInboundHandlerAdapter {

    private static Logger log = LoggerFactory.getLogger(EchoServerHandler.class);

    @Override
    public void channelActive(ChannelHandlerContext ctx) throws Exception {
// Path: kcp-example/src/main/java/io/jpower/kcp/example/echo/EchoServerHandler.java
// public class EchoServerHandler extends ChannelInboundHandlerAdapter {
// 
//     @Override
//     public void channelActive(ChannelHandlerContext ctx) throws Exception {
//         UkcpChannel kcpCh = (UkcpChannel) ctx.channel();
//         kcpCh.conv(EchoServer.CONV);
//     }
// 
//     @Override
//     public void channelRead(ChannelHandlerContext ctx, Object msg) {
//         ctx.write(msg);
//     }
// 
//     @Override
//     public void channelReadComplete(ChannelHandlerContext ctx) {
//         ctx.flush();
//     }
// 
//     @Override
//     public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
//         // Close the connection when an exception is raised.
//         cause.printStackTrace();
//         ctx.close();
//     }
// 
// }
// 
// Path: kcp-netty/src/main/java/io/jpower/kcp/netty/UkcpChannel.java
// public interface UkcpChannel extends Channel {
// 
//     int conv();
// 
//     @Override
//     UkcpChannelConfig config();
// 
//     UkcpChannel conv(int conv);
// 
//     @Override
//     InetSocketAddress localAddress();
// 
//     @Override
//     InetSocketAddress remoteAddress();
// 
// }


// Path: kcp-example/src/main/java/io/jpower/kcp/example/rtt/KcpRttServerHandler.java
import io.jpower.kcp.example.echo.EchoServerHandler;
import io.jpower.kcp.netty.UkcpChannel;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

package io.jpower.kcp.example.rtt;


/**
 * @author <a href="mailto:szhnet@gmail.com">szh</a>
 */
public class KcpRttServerHandler extends ChannelInboundHandlerAdapter {

    private static Logger log = LoggerFactory.getLogger(EchoServerHandler.class);

    @Override
    public void channelActive(ChannelHandlerContext ctx) throws Exception {
        UkcpChannel kcpCh = (UkcpChannel) ctx.channel();