Skip navigation

User guide for 3.x

Did you know this page is automatically generated from a Github Wiki page? You can improve it by yourself here!

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 should transfer received signed int to "unsigned int".

         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));
Last retrieved on 12-Jun-2024