|
@@ -175,11 +175,10 @@ public class NettyServer extends NettyServerFactory {
|
|
|
* 获取默认的 Channel 类型
|
|
|
*/
|
|
|
private Class<? extends ServerChannel> getDefaultChannelClass() {
|
|
|
- System.out.println("Epoll is supported:=====================================================> " + Epoll.isAvailable());
|
|
|
- if (!Epoll.isAvailable()) {
|
|
|
- System.out.println("Epoll unavailable cause: ===========================================>" + Epoll.unavailabilityCause());
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
String osName = System.getProperty("os.name").toLowerCase();
|
|
|
if (osName.contains("linux")) {
|
|
@@ -187,10 +186,11 @@ public class NettyServer extends NettyServerFactory {
|
|
|
}
|
|
|
return NioServerSocketChannel.class;
|
|
|
}
|
|
|
- public static void main(String[] args) {
|
|
|
- System.out.println("Epoll is supported: " + Epoll.isAvailable());
|
|
|
- if (!Epoll.isAvailable()) {
|
|
|
- System.out.println("Epoll unavailable cause: " + Epoll.unavailabilityCause());
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|