From 52931abe7394ddf07a74b311e608e2dbf941e1e3 Mon Sep 17 00:00:00 2001 From: catcherwong Date: Sun, 10 Jan 2021 16:50:41 +0800 Subject: [PATCH] Add CSharp Client --- .../com/alibaba/nacos/naming/push/ClientInfo.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/naming/src/main/java/com/alibaba/nacos/naming/push/ClientInfo.java b/naming/src/main/java/com/alibaba/nacos/naming/push/ClientInfo.java index 9aac67dee..b785e3c70 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/push/ClientInfo.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/push/ClientInfo.java @@ -106,6 +106,15 @@ public class ClientInfo { return; } + + if (versionStr.startsWith(ClientTypeDescription.CSHARP_CLIENT)) { + type = ClientType.CSHARP; + + versionStr = versionStr.substring(versionStr.indexOf(":v") + 2, versionStr.length()); + version = VersionUtil.parseVersion(versionStr); + + return; + } //we're not eager to implement other type yet this.type = ClientType.UNKNOWN; @@ -125,6 +134,10 @@ public class ClientInfo { * C client type. */ C, + /** + * CSharp client type. + */ + CSHARP, /** * php client type. */ @@ -166,6 +179,8 @@ public class ClientInfo { public static final String CPP_CLIENT = "vip-client4cpp"; public static final String GO_CLIENT = "Nacos-Go-Client"; + + public static final String CSHARP_CLIENT = "Nacos-CSharp-Client"; }