Browse Source

找服务接口

Administrator 2 months ago
parent
commit
71b4b84ed7

+ 10 - 3
incubator-common/src/main/java/com/incubator/common/net/netty/server/NettyServer.java

@@ -12,6 +12,7 @@ import com.incubator.common.net.netty.ServerOptionConfiger;
 import io.netty.bootstrap.ServerBootstrap;
 import io.netty.buffer.ByteBufAllocator;
 import io.netty.channel.*;
+import io.netty.channel.epoll.Epoll;
 import io.netty.channel.epoll.EpollServerSocketChannel;
 import io.netty.channel.group.ChannelGroup;
 import io.netty.channel.group.DefaultChannelGroup;
@@ -175,9 +176,15 @@ public class NettyServer extends NettyServerFactory {
 	 */
 	private Class<? extends ServerChannel> getDefaultChannelClass() {
 		String osName = System.getProperty("os.name").toLowerCase();
-		if (osName.contains("linux")) {
-			return EpollServerSocketChannel.class;
-		}
+//		if (osName.contains("linux")) {
+//			return EpollServerSocketChannel.class;
+//		}
 		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());
+		}
+	}
 }

+ 5 - 3
incubator-game/src/main/java/com/incubator/game/util/GDUtils.java

@@ -1307,10 +1307,12 @@ public final class GDUtils {
         for (int i = 0; i < points.size() - 1; i++) {
             gaps += points.get(i + 1) - points.get(i) - 1;
         }
-
-        // 特殊情况处理:10-J-Q-K-A
+        // 特殊情况处理:A-2-3-4-5 和 10-J-Q-K-A
+        if (points.contains(14) && points.contains(2)) {
+            return true; // A-2-3-4-5
+        }
         if (points.contains(10) && points.contains(11) && points.contains(12) && points.contains(13) && points.contains(14)) {
-            return true; // 10-J-Q-K-A
+            return true;
         }
         // 检查是否可以使用赖子牌补齐 gaps
         return gaps <= wildCount;