Skip to content

Latest commit

 

History

History
6 lines (4 loc) · 398 Bytes

File metadata and controls

6 lines (4 loc) · 398 Bytes

内核读取网络数据,先扔到queue中再处理

  • bio: read()读取,如果没有读取到就阻塞,读取到数据后再返回【一个线程维护一个连接】
  • nio: read()读取,无论是否读取到数据都会返回,不会阻塞

多路复用器(linux中select、poll、epoll):多个连接作为参数传递给一个函数,函数会返回其中有数据的状态或事件