@Slf4j public class MultiThreadServer { // 获取 cpu核心数 private static final int cpu = Runtime.getRuntime().availableProcessors(); public static void main(String[] args) throws IOException { Thread.currentThread().setName("boss"); Selector boss = Select…