add nioServer and some methods