Refactor read/write buffer of NioSessionProcessor.