Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.bounceme.dur.netty;
- import io.netty.channel.ChannelHandlerContext;
- import io.netty.channel.SimpleChannelInboundHandler;
- import java.util.logging.Logger;
- public class PingPongClientHandler extends SimpleChannelInboundHandler<PingPong> {
- private static final Logger log = Logger.getLogger(PingPongClientHandler.class.getName());
- public PingPongClientHandler() {
- }
- @Override
- protected void channelRead0(ChannelHandlerContext chc, PingPong pingPong) throws Exception {
- log.info("reading...");
- chc.writeAndFlush(new PingPong());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment