56

一篇文章帮你彻底搞清楚“I/O多路复用”和“异步I/O”的前世今生-wx5c7f616d835a9的博客

 4 years ago
source link: https://blog.51cto.com/14227759/2409749
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
在网络的初期,网民很少,服务器完全无压力,那时的技术也没有现在先进,通常用一个线程来全程跟踪处理一个请求。因为这样最简单。其实代码实现大家都知道,就是服务器上有个ServerSocket在某个端口监听,接收到客户端的连接后,会创建一个Socket,并把它交给一个线程进行后续处理。线程主要从Socket读取客户端传过来的数据,然后进行业务处理,并把结果再写入Socket传回客户端。由于网络的原因,S

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK