高速选择器通道部件HSC ?
NIO 的非阻塞I/O机制是围绕选择器和通道构建的。
NIO's nonblocking I/O mechanism is built around selectors and channels.
然后,应用程序用register调用向选择器注册通道(文件描述符)和感兴趣的操作。
The application then registers channels (file descriptors) and interested operations to the selector with a register call on the channel.
然后,选择器把通道和感兴趣的操作复制到内核空间,让内核为这个应用程序执行实际的poll。
The selector then copies the channels and interested operations into the kernel space and let the kernel do the actual polling for the application.
当应用程序注册通道时,选择器在本机pollset结构中注册文件描述符和感兴趣的事件。
The selector then registers file descriptors and interested events into a native pollset structure when the application registers the channel.
当应用程序注册通道时,选择器在本机pollset结构中注册文件描述符和感兴趣的事件。
The selector then registers file descriptors and interested events into a native pollset structure when the application registers the channel.
应用推荐