thufir

Untitled

Jul 20th, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. package net.bounceme.dur.netty;
  2.  
  3. import io.netty.channel.ChannelHandlerContext;
  4. import io.netty.channel.SimpleChannelInboundHandler;
  5. import java.util.logging.Logger;
  6.  
  7. public class PingPongClientHandler extends SimpleChannelInboundHandler<PingPong> {
  8.  
  9.     private static final Logger log = Logger.getLogger(PingPongClientHandler.class.getName());
  10.  
  11.     public PingPongClientHandler() {
  12.     }
  13.  
  14.     @Override
  15.     protected void channelRead0(ChannelHandlerContext chc, PingPong pingPong) throws Exception {
  16.         log.info("reading...");
  17.         chc.writeAndFlush(new PingPong());
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment