ADD:add closing feature for NIOServer