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 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();
 }
Last retrieved on 15-Dec-2025

AltStyle によって変換されたページ (->オリジナル) /