User guide for 3.x - netty/netty GitHub Wiki

This page needs work!

Please read this until the user guide is moved to the wiki.

There is a bug in section 1.6 Writing a Time Client, the TimeClientHandler.java should transfer received signed int to "unsigned int".

     @Override
         public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
         ChannelBuffer buf = (ChannelBuffer) e.getMessage();
         long currentTimeMillis = buf.readInt();
         currentTimeMillis = currentTimeMillis >= 0 ? currentTimeMillis : 
        	 currentTimeMillis & 0x0FFFFFFFFL;
         currentTimeMillis = (currentTimeMillis - 2208988800L) * 1000L;
         System.out.println(new Date(currentTimeMillis));
         e.getChannel().close();
     }