refactoring nettool code, add NIO client wrap code that is a simple template of client programming