比如服务器的底层的socket的channel的read和write 已经注册到了selector中, 那么上层的servlet还能调用getOutputStream返回servletOutputStream吗? 如果能该怎么写代码呢?
光阴似箭催人老,日月如移越少年。
Why do the title and problem description seem to be written differently? Were they written by two people?
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.
Why do the title and problem description seem to be written differently? Were they written by two people?
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.