Wrapper of NIO, use a single thread to handle the select operation.