比如服务器的底层的socket的channel的read和write 已经注册到了selector中, 那么上层的servlet还能调用getOutputStream返回servletOutputStream吗? 如果能该怎么写代码呢?
天蓬老师2017-04-18 10:11:50
Why do the title and problem description seem to be written differently? Were they written by two people?
伊谢尔伦2017-04-18 10:11:50
Yes, the technology used by the server is transparent to you when developing Servlets. You don’t need to worry about whether the server is NIO or BIO, Servlets are written the same.