com.xmobitea.changx.gn-unity 1.0.7 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/Editor/GNServerSettingsEditor.cs +48 -94
  2. package/Runtime/Common/GNArray.cs +122 -81
  3. package/Runtime/Common/GNData.cs +13 -7
  4. package/Runtime/Common/GNHashtable.cs +71 -63
  5. package/Runtime/Common/IGNData.cs +3 -1
  6. package/Runtime/Config/GNServerSettings.cs +112 -45
  7. package/Runtime/Constant/Commands.cs +3 -0
  8. package/Runtime/Constant/EnumType/FriendStatus.cs +6 -4
  9. package/Runtime/Constant/EnumType/GoogleLoginType.cs +2 -0
  10. package/Runtime/Constant/EnumType/GroupStatus.cs +12 -0
  11. package/Runtime/Constant/EnumType/{UserRoleType.cs.meta → GroupStatus.cs.meta} +1 -1
  12. package/Runtime/Constant/EnumType/InvalidMemberType.cs +17 -15
  13. package/Runtime/Constant/EnumType/ItemType.cs +10 -0
  14. package/Runtime/Constant/EnumType/{LoginType.cs.meta → ItemType.cs.meta} +1 -1
  15. package/Runtime/Constant/EnumType/MatchmakingMemberStatus.cs +11 -0
  16. package/Runtime/Constant/{ErrorCode/DebugErrorCode.cs.meta → EnumType/MatchmakingMemberStatus.cs.meta} +11 -11
  17. package/Runtime/Constant/EnumType/MatchmakingTicketStatus.cs +13 -0
  18. package/Runtime/Constant/EnumType/{PlatformType.cs.meta → MatchmakingTicketStatus.cs.meta} +11 -11
  19. package/Runtime/Constant/EnumType/OwnerType.cs +12 -0
  20. package/Runtime/Constant/EnumType/OwnerType.cs.meta +11 -0
  21. package/Runtime/Constant/EnumType/PermissionDataItem.cs +10 -0
  22. package/Runtime/Constant/EnumType/PermissionDataItem.cs.meta +11 -0
  23. package/Runtime/Constant/EnumType/RequestRole.cs +11 -0
  24. package/Runtime/Constant/EnumType/RequestRole.cs.meta +7 -0
  25. package/Runtime/Constant/EnumType/RequestType.cs +19 -0
  26. package/Runtime/Constant/EnumType/RequestType.cs.meta +11 -0
  27. package/Runtime/Constant/ErrorCode/GNErrorCode.cs +54 -0
  28. package/Runtime/Constant/ErrorCode/GNErrorCode.cs.meta +7 -0
  29. package/Runtime/Constant/EventCode.cs +10 -1
  30. package/Runtime/Constant/OperationCode.cs +212 -14
  31. package/Runtime/Constant/ParameterCode/GNParameterCode.cs +470 -0
  32. package/Runtime/Constant/ParameterCode/GNParameterCode.cs.meta +11 -0
  33. package/Runtime/Constant/ParameterCode/ParameterCode.cs +2 -0
  34. package/Runtime/Constant/ReturnCode.cs +13 -7
  35. package/Runtime/Entity/DataMember.cs +124 -0
  36. package/Runtime/Entity/DataMember.cs.meta +11 -0
  37. package/Runtime/Entity/GNMetadata.cs +27 -0
  38. package/Runtime/Entity/GNMetadata.cs.meta +11 -0
  39. package/Runtime/Entity/InvalidMember.cs +8 -3
  40. package/Runtime/Entity/Models/AuthenticateModels.cs +316 -0
  41. package/Runtime/Entity/Models/AuthenticateModels.cs.meta +11 -0
  42. package/Runtime/Entity/Models/AuthenticateRequestModels.cs +186 -0
  43. package/Runtime/Entity/Models/AuthenticateRequestModels.cs.meta +11 -0
  44. package/Runtime/Entity/Models/AuthenticateResponseModels.cs +90 -0
  45. package/Runtime/Entity/Models/AuthenticateResponseModels.cs.meta +11 -0
  46. package/Runtime/Entity/Models/CharacterPlayerModels.cs +1208 -0
  47. package/Runtime/Entity/Models/CharacterPlayerModels.cs.meta +11 -0
  48. package/Runtime/Entity/Models/CharacterPlayerRequestModels.cs +1233 -0
  49. package/Runtime/Entity/Models/CharacterPlayerRequestModels.cs.meta +11 -0
  50. package/Runtime/Entity/Models/CharacterPlayerResponseModels.cs +254 -0
  51. package/Runtime/Entity/Models/CharacterPlayerResponseModels.cs.meta +11 -0
  52. package/Runtime/Entity/Models/ContentModels.cs +223 -0
  53. package/Runtime/Entity/Models/ContentModels.cs.meta +11 -0
  54. package/Runtime/Entity/Models/ContentRequestModels.cs +185 -0
  55. package/Runtime/Entity/Models/ContentRequestModels.cs.meta +11 -0
  56. package/Runtime/Entity/Models/ContentResponseModels.cs +44 -0
  57. package/Runtime/Entity/Models/ContentResponseModels.cs.meta +11 -0
  58. package/Runtime/Entity/Models/DashboardModels.cs +1696 -0
  59. package/Runtime/Entity/Models/DashboardModels.cs.meta +11 -0
  60. package/Runtime/Entity/Models/DashboardRequestModels.cs +208 -0
  61. package/Runtime/Entity/Models/DashboardRequestModels.cs.meta +11 -0
  62. package/Runtime/Entity/Models/DashboardResponseModels.cs +99 -0
  63. package/Runtime/Entity/Models/DashboardResponseModels.cs.meta +11 -0
  64. package/Runtime/Entity/Models/GamePlayerModels.cs +1326 -0
  65. package/Runtime/Entity/Models/GamePlayerModels.cs.meta +11 -0
  66. package/Runtime/Entity/Models/GamePlayerRequestModels.cs +1208 -0
  67. package/Runtime/Entity/Models/GamePlayerRequestModels.cs.meta +11 -0
  68. package/Runtime/Entity/Models/GamePlayerResponseModels.cs +249 -0
  69. package/Runtime/Entity/Models/GamePlayerResponseModels.cs.meta +11 -0
  70. package/Runtime/Entity/Models/GenericModels.cs +154 -0
  71. package/Runtime/Entity/Models/GenericModels.cs.meta +11 -0
  72. package/Runtime/Entity/Models/GroupModels.cs +957 -0
  73. package/Runtime/Entity/Models/GroupModels.cs.meta +11 -0
  74. package/Runtime/Entity/Models/GroupRequestModels.cs +933 -0
  75. package/Runtime/Entity/Models/GroupRequestModels.cs.meta +11 -0
  76. package/Runtime/Entity/Models/GroupResponseModels.cs +194 -0
  77. package/Runtime/Entity/Models/GroupResponseModels.cs.meta +11 -0
  78. package/Runtime/Entity/Models/InventoryModels.cs +789 -0
  79. package/Runtime/Entity/Models/InventoryModels.cs.meta +11 -0
  80. package/Runtime/Entity/Models/InventoryRequestModels.cs +810 -0
  81. package/Runtime/Entity/Models/InventoryRequestModels.cs.meta +11 -0
  82. package/Runtime/Entity/Models/InventoryResponseModels.cs +169 -0
  83. package/Runtime/Entity/Models/InventoryResponseModels.cs.meta +11 -0
  84. package/Runtime/Entity/Models/MasterPlayerModels.cs +1907 -0
  85. package/Runtime/Entity/Models/MasterPlayerModels.cs.meta +11 -0
  86. package/Runtime/Entity/Models/MasterPlayerRequestModels.cs +1744 -0
  87. package/Runtime/Entity/Models/MasterPlayerRequestModels.cs.meta +11 -0
  88. package/Runtime/Entity/Models/MasterPlayerResponseModels.cs +359 -0
  89. package/Runtime/Entity/Models/MasterPlayerResponseModels.cs.meta +11 -0
  90. package/Runtime/Entity/Models/MultiplayerModels.cs +323 -0
  91. package/Runtime/Entity/Models/MultiplayerModels.cs.meta +11 -0
  92. package/Runtime/Entity/Models/MultiplayerRequestModels.cs +208 -0
  93. package/Runtime/Entity/Models/MultiplayerRequestModels.cs.meta +11 -0
  94. package/Runtime/Entity/Models/MultiplayerResponseModels.cs +49 -0
  95. package/Runtime/Entity/Models/MultiplayerResponseModels.cs.meta +11 -0
  96. package/Runtime/Entity/Models/StoreInventoryModels.cs +474 -0
  97. package/Runtime/Entity/Models/StoreInventoryModels.cs.meta +11 -0
  98. package/Runtime/Entity/Models/StoreInventoryRequestModels.cs +235 -0
  99. package/Runtime/Entity/Models/StoreInventoryRequestModels.cs.meta +11 -0
  100. package/Runtime/Entity/Models/StoreInventoryResponseModels.cs +54 -0
  101. package/Runtime/Entity/Models/StoreInventoryResponseModels.cs.meta +11 -0
  102. package/Runtime/Entity/Models.meta +8 -0
  103. package/Runtime/Entity/OperationEvent.cs +14 -9
  104. package/Runtime/Entity/OperationHelper.cs +13 -7
  105. package/Runtime/Entity/OperationRequest.cs +20 -20
  106. package/Runtime/Entity/OperationResponse.cs +27 -17
  107. package/Runtime/Entity/Request/CustomOperationRequest.cs +37 -7
  108. package/Runtime/Entity/Response/CustomOperationResponse.cs +34 -11
  109. package/Runtime/GNNetwork.cs +80 -83
  110. package/Runtime/GNNetworkApi.cs +7 -115
  111. package/Runtime/GNNetworkAuthenticateApi.cs +110 -0
  112. package/Runtime/GNNetworkAuthenticateApi.cs.meta +11 -0
  113. package/Runtime/GNNetworkCharacterPlayerApi.cs +766 -0
  114. package/Runtime/GNNetworkCharacterPlayerApi.cs.meta +11 -0
  115. package/Runtime/GNNetworkContentApi.cs +136 -0
  116. package/Runtime/GNNetworkContentApi.cs.meta +11 -0
  117. package/Runtime/GNNetworkDashboardApi.cs +121 -0
  118. package/Runtime/GNNetworkDashboardApi.cs.meta +11 -0
  119. package/Runtime/GNNetworkGamePlayerApi.cs +751 -0
  120. package/Runtime/GNNetworkGamePlayerApi.cs.meta +11 -0
  121. package/Runtime/GNNetworkGroupApi.cs +586 -0
  122. package/Runtime/GNNetworkGroupApi.cs.meta +11 -0
  123. package/Runtime/GNNetworkInventoryApi.cs +511 -0
  124. package/Runtime/GNNetworkInventoryApi.cs.meta +11 -0
  125. package/Runtime/GNNetworkMasterPlayerApi.cs +1071 -0
  126. package/Runtime/GNNetworkMasterPlayerApi.cs.meta +11 -0
  127. package/Runtime/GNNetworkMultiplayerApi.cs +151 -0
  128. package/Runtime/GNNetworkMultiplayerApi.cs.meta +11 -0
  129. package/Runtime/GNNetworkStoreInventoryApi.cs +166 -0
  130. package/Runtime/GNNetworkStoreInventoryApi.cs.meta +11 -0
  131. package/Runtime/Helper/CodeHelper.cs +44 -23
  132. package/Runtime/Helper/ConverterService.cs +452 -0
  133. package/Runtime/Helper/ConverterService.cs.meta +11 -0
  134. package/Runtime/Logger/GNDebug.cs +4 -4
  135. package/Runtime/Networking/AuthenticateStatus.cs +35 -0
  136. package/Runtime/Networking/AuthenticateStatus.cs.meta +11 -0
  137. package/Runtime/Networking/Handler/IServerEventHandler.cs +14 -2
  138. package/Runtime/Networking/Handler/OnCharacterPlayerFriendUpdateEventHandler.cs +32 -0
  139. package/Runtime/Networking/Handler/OnCharacterPlayerFriendUpdateEventHandler.cs.meta +11 -0
  140. package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs +33 -0
  141. package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs.meta +11 -0
  142. package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs +32 -0
  143. package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs.meta +11 -0
  144. package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs +32 -0
  145. package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs.meta +11 -0
  146. package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs +29 -0
  147. package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs.meta +11 -0
  148. package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs +29 -0
  149. package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs.meta +11 -0
  150. package/Runtime/Networking/Http/HttpPeer.cs +176 -0
  151. package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs +25 -0
  152. package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs.meta +11 -0
  153. package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs +373 -0
  154. package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs.meta +11 -0
  155. package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs +207 -0
  156. package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs.meta +11 -0
  157. package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs +188 -0
  158. package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs.meta +11 -0
  159. package/Runtime/Networking/Http.meta +8 -0
  160. package/Runtime/Networking/IPeer.cs +6 -5
  161. package/Runtime/Networking/NetworkingPeer.cs +81 -52
  162. package/Runtime/Networking/NetworkingPeerAPI.cs +23 -311
  163. package/Runtime/Networking/OperationPending.cs +47 -10
  164. package/Runtime/Networking/PeerBase.cs +87 -84
  165. package/Runtime/Networking/{NetworkingPeerSocketV2.cs → Socket/NetworkingPeerSocketV2.cs} +44 -41
  166. package/Runtime/Networking/{NetworkingPeerSocketV3.cs → Socket/NetworkingPeerSocketV3.cs} +43 -40
  167. package/Runtime/Networking/{NetworkingPeerBase.cs → Socket/NetworkingSocketPeerBase.cs} +41 -49
  168. package/Runtime/Networking/Socket/SocketPeer.cs +193 -0
  169. package/Runtime/Networking/Socket.meta +8 -0
  170. package/Runtime/Unity/ServiceUpdate.cs +20 -0
  171. package/Runtime/Unity/ServiceUpdate.cs.meta +11 -0
  172. package/Runtime/Unity.meta +8 -0
  173. package/Runtime/XmobiTea.GN.runtime.asmdef +1 -2
  174. package/package.json +2 -4
  175. package/Runtime/Constant/EnumType/LoginType.cs +0 -14
  176. package/Runtime/Constant/EnumType/PlatformType.cs +0 -12
  177. package/Runtime/Constant/EnumType/UserRoleType.cs +0 -12
  178. package/Runtime/Constant/ErrorCode/DebugErrorCode.cs +0 -7
  179. package/Runtime/Constant/ErrorCode/EnterDisplayNameErrorCode.cs +0 -7
  180. package/Runtime/Constant/ErrorCode/EnterDisplayNameErrorCode.cs.meta +0 -11
  181. package/Runtime/Constant/ErrorCode/FetchAllDataErrorCode.cs +0 -8
  182. package/Runtime/Constant/ErrorCode/FetchAllDataErrorCode.cs.meta +0 -11
  183. package/Runtime/Constant/ErrorCode/FetchSparkPlayerErrorCode.cs +0 -8
  184. package/Runtime/Constant/ErrorCode/FetchSparkPlayerErrorCode.cs.meta +0 -11
  185. package/Runtime/Constant/ErrorCode/FileUploadInfoErrorCode.cs +0 -9
  186. package/Runtime/Constant/ErrorCode/FileUploadInfoErrorCode.cs.meta +0 -11
  187. package/Runtime/Constant/ErrorCode/GetAppConfigErrorCode.cs +0 -7
  188. package/Runtime/Constant/ErrorCode/GetAppConfigErrorCode.cs.meta +0 -11
  189. package/Runtime/Constant/ErrorCode/LoginErrorCode.cs +0 -14
  190. package/Runtime/Constant/ErrorCode/LoginErrorCode.cs.meta +0 -11
  191. package/Runtime/Constant/ErrorCode/RegisterSocketErrorCode.cs +0 -7
  192. package/Runtime/Constant/ErrorCode/RegisterSocketErrorCode.cs.meta +0 -11
  193. package/Runtime/Constant/ParameterCode/DebugParameterCode.cs +0 -11
  194. package/Runtime/Constant/ParameterCode/DebugParameterCode.cs.meta +0 -11
  195. package/Runtime/Constant/ParameterCode/EnterDisplayNameParameterCode.cs +0 -8
  196. package/Runtime/Constant/ParameterCode/EnterDisplayNameParameterCode.cs.meta +0 -11
  197. package/Runtime/Constant/ParameterCode/FetchAllDataParameterCode.cs +0 -11
  198. package/Runtime/Constant/ParameterCode/FetchAllDataParameterCode.cs.meta +0 -11
  199. package/Runtime/Constant/ParameterCode/FetchSparkPlayerParameterCode.cs +0 -19
  200. package/Runtime/Constant/ParameterCode/FetchSparkPlayerParameterCode.cs.meta +0 -11
  201. package/Runtime/Constant/ParameterCode/FileUploadInfoParameterCode.cs +0 -15
  202. package/Runtime/Constant/ParameterCode/FileUploadInfoParameterCode.cs.meta +0 -11
  203. package/Runtime/Constant/ParameterCode/GetAppConfigParameterCode.cs +0 -8
  204. package/Runtime/Constant/ParameterCode/GetAppConfigParameterCode.cs.meta +0 -11
  205. package/Runtime/Constant/ParameterCode/LoginParameterCode.cs +0 -22
  206. package/Runtime/Constant/ParameterCode/LoginParameterCode.cs.meta +0 -11
  207. package/Runtime/Constant/ParameterCode/RegisterSocketParameterCode.cs +0 -7
  208. package/Runtime/Constant/ParameterCode/RegisterSocketParameterCode.cs.meta +0 -11
  209. package/Runtime/Entity/Request/CreateNewFileUploadInfoOperationRequest.cs +0 -21
  210. package/Runtime/Entity/Request/CreateNewFileUploadInfoOperationRequest.cs.meta +0 -11
  211. package/Runtime/Entity/Request/DebugOperationRequest.cs +0 -25
  212. package/Runtime/Entity/Request/DebugOperationRequest.cs.meta +0 -11
  213. package/Runtime/Entity/Request/EnterDisplayNameOperationRequest.cs +0 -21
  214. package/Runtime/Entity/Request/EnterDisplayNameOperationRequest.cs.meta +0 -11
  215. package/Runtime/Entity/Request/FetchAllDataOperationRequest.cs +0 -19
  216. package/Runtime/Entity/Request/FetchAllDataOperationRequest.cs.meta +0 -11
  217. package/Runtime/Entity/Request/FetchSparkPlayerOperationRequest.cs +0 -19
  218. package/Runtime/Entity/Request/FetchSparkPlayerOperationRequest.cs.meta +0 -11
  219. package/Runtime/Entity/Request/GetAppConfigOperationRequest.cs +0 -21
  220. package/Runtime/Entity/Request/GetAppConfigOperationRequest.cs.meta +0 -11
  221. package/Runtime/Entity/Request/GetFileUploadInfoOperationRequest.cs +0 -21
  222. package/Runtime/Entity/Request/GetFileUploadInfoOperationRequest.cs.meta +0 -11
  223. package/Runtime/Entity/Request/LoginOperationRequest.cs +0 -140
  224. package/Runtime/Entity/Request/LoginOperationRequest.cs.meta +0 -11
  225. package/Runtime/Entity/Request/LogoutOperationRequest.cs +0 -19
  226. package/Runtime/Entity/Request/LogoutOperationRequest.cs.meta +0 -11
  227. package/Runtime/Entity/Request/RegisterAccountOperationRequest.cs +0 -22
  228. package/Runtime/Entity/Request/RegisterAccountOperationRequest.cs.meta +0 -11
  229. package/Runtime/Entity/Request/RegisterSocketOperationRequest.cs +0 -21
  230. package/Runtime/Entity/Request/RegisterSocketOperationRequest.cs.meta +0 -11
  231. package/Runtime/Entity/Request/TemplateOperationRequest.cs +0 -21
  232. package/Runtime/Entity/Request/TemplateOperationRequest.cs.meta +0 -11
  233. package/Runtime/Entity/Response/CreateNewFileUploadInfoOperationResponse.cs +0 -32
  234. package/Runtime/Entity/Response/CreateNewFileUploadInfoOperationResponse.cs.meta +0 -11
  235. package/Runtime/Entity/Response/DebugOperationResponse.cs +0 -33
  236. package/Runtime/Entity/Response/DebugOperationResponse.cs.meta +0 -11
  237. package/Runtime/Entity/Response/EnterDisplayNameOperationResponse.cs +0 -26
  238. package/Runtime/Entity/Response/EnterDisplayNameOperationResponse.cs.meta +0 -11
  239. package/Runtime/Entity/Response/FetchAllDataOperationResponse.cs +0 -35
  240. package/Runtime/Entity/Response/FetchAllDataOperationResponse.cs.meta +0 -11
  241. package/Runtime/Entity/Response/FetchSparkPlayerOperationResponse.cs +0 -59
  242. package/Runtime/Entity/Response/FetchSparkPlayerOperationResponse.cs.meta +0 -11
  243. package/Runtime/Entity/Response/GetAppConfigOperationResponse.cs +0 -24
  244. package/Runtime/Entity/Response/GetAppConfigOperationResponse.cs.meta +0 -11
  245. package/Runtime/Entity/Response/GetFileUploadInfoOperationResponse.cs +0 -56
  246. package/Runtime/Entity/Response/GetFileUploadInfoOperationResponse.cs.meta +0 -11
  247. package/Runtime/Entity/Response/LoginOperationResponse.cs +0 -34
  248. package/Runtime/Entity/Response/LoginOperationResponse.cs.meta +0 -11
  249. package/Runtime/Entity/Response/LogoutOperationResponse.cs +0 -27
  250. package/Runtime/Entity/Response/LogoutOperationResponse.cs.meta +0 -11
  251. package/Runtime/Entity/Response/PublicAddressGetRandomMessageOperationResponse.cs +0 -24
  252. package/Runtime/Entity/Response/PublicAddressGetRandomMessageOperationResponse.cs.meta +0 -11
  253. package/Runtime/Entity/Response/RegisterAccountOperationResponse.cs +0 -23
  254. package/Runtime/Entity/Response/RegisterAccountOperationResponse.cs.meta +0 -11
  255. package/Runtime/Entity/Response/RegisterSocketOperationResponse.cs +0 -23
  256. package/Runtime/Entity/Response/RegisterSocketOperationResponse.cs.meta +0 -11
  257. package/Runtime/Entity/Response/TemplateOperationResponse.cs +0 -24
  258. package/Runtime/Entity/Response/TemplateOperationResponse.cs.meta +0 -11
  259. package/Runtime/Networking/Handler/OnDebugEventHandler.cs +0 -17
  260. package/Runtime/Networking/Handler/OnDebugEventHandler.cs.meta +0 -11
  261. package/Runtime/Networking/HttpPeer.cs +0 -497
  262. package/Runtime/Networking/SocketPeer.cs +0 -179
  263. /package/Runtime/Networking/{HttpPeer.cs.meta → Http/HttpPeer.cs.meta} +0 -0
  264. /package/Runtime/Networking/{NetworkingPeerSocketV2.cs.meta → Socket/NetworkingPeerSocketV2.cs.meta} +0 -0
  265. /package/Runtime/Networking/{NetworkingPeerSocketV3.cs.meta → Socket/NetworkingPeerSocketV3.cs.meta} +0 -0
  266. /package/Runtime/Networking/{NetworkingPeerBase.cs.meta → Socket/NetworkingSocketPeerBase.cs.meta} +0 -0
  267. /package/Runtime/Networking/{SocketPeer.cs.meta → Socket/SocketPeer.cs.meta} +0 -0
@@ -4,41 +4,44 @@
4
4
  using System.Collections.Generic;
5
5
  using System.Text;
6
6
 
7
+ /// <summary>
8
+ /// The GNData dictionary, it store Dictionary can be use to request or response
9
+ /// </summary>
7
10
  public class GNHashtable : GNData
8
11
  {
9
12
  public class Builder
10
13
  {
11
- private IDictionary<string, object> originObject;
14
+ private IDictionary<string, object> dict;
12
15
 
13
- public Builder Add(string key, object value)
16
+ public Builder add(string key, object value)
14
17
  {
15
- this.originObject[key] = value;
18
+ this.dict[key] = value;
16
19
 
17
20
  return this;
18
21
  }
19
22
 
20
- public Builder AddAll(System.Collections.IDictionary dict)
23
+ public Builder addAll(System.Collections.IDictionary dict)
21
24
  {
22
25
  var keys = dict.Keys;
23
26
  foreach (var key in keys)
24
27
  {
25
28
  if (key is string keyStr)
26
29
  {
27
- this.Add(keyStr, dict[key]);
30
+ this.add(keyStr, dict[key]);
28
31
  }
29
32
  }
30
33
 
31
34
  return this;
32
35
  }
33
36
 
34
- public GNHashtable Build()
37
+ public GNHashtable build()
35
38
  {
36
39
  var awnser = new GNHashtable();
37
40
 
38
- var keys = originObject.Keys;
41
+ var keys = this.dict.Keys;
39
42
  foreach (var key in keys)
40
43
  {
41
- awnser.Add(key, originObject[key]);
44
+ awnser.add(key, this.dict[key]);
42
45
  }
43
46
 
44
47
  return awnser;
@@ -46,57 +49,57 @@
46
49
 
47
50
  public Builder()
48
51
  {
49
- this.originObject = new Dictionary<string, object>();
52
+ this.dict = new Dictionary<string, object>();
50
53
  }
51
54
  }
52
55
 
53
- private IDictionary<string, object> originObject;
56
+ private IDictionary<string, object> dict;
54
57
 
55
58
  public GNHashtable()
56
59
  {
57
- this.originObject = new Dictionary<string, object>();
60
+ this.dict = new Dictionary<string, object>();
58
61
  }
59
62
 
60
- public void Add(string key, object value)
63
+ public void add(string key, object value)
61
64
  {
62
- this.originObject[key] = CreateUseDataFromOriginData(value);
65
+ this.dict[key] = GNData.createUseDataFromOriginData(value);
63
66
  }
64
67
 
65
- public ICollection<object> Values()
68
+ public ICollection<object> values()
66
69
  {
67
- return this.originObject.Values;
70
+ return this.dict.Values;
68
71
  }
69
72
 
70
- public ICollection<string> Keys()
73
+ public ICollection<string> keys()
71
74
  {
72
- return this.originObject.Keys;
75
+ return this.dict.Keys;
73
76
  }
74
77
 
75
- public bool ContainsKey(string key)
78
+ public bool containsKey(string key)
76
79
  {
77
- return this.originObject.ContainsKey(key);
80
+ return this.dict.ContainsKey(key);
78
81
  }
79
82
 
80
- public void Clear()
83
+ public void clear()
81
84
  {
82
- this.originObject.Clear();
85
+ this.dict.Clear();
83
86
  }
84
87
 
85
- public bool Remove(string key)
88
+ public bool remove(string key)
86
89
  {
87
- return this.originObject.Remove(key);
90
+ return this.dict.Remove(key);
88
91
  }
89
92
 
90
- public int Count()
93
+ public int count()
91
94
  {
92
- return this.originObject.Count;
95
+ return this.dict.Count;
93
96
  }
94
97
 
95
- protected object Get<T>(string k, T defaultValue = default(T))
98
+ protected object get<T>(string k, T defaultValue = default(T))
96
99
  {
97
- if (this.originObject.ContainsKey(k))
100
+ if (this.dict.ContainsKey(k))
98
101
  {
99
- var value = this.originObject[k];
102
+ var value = this.dict[k];
100
103
 
101
104
  if (value == null) return defaultValue;
102
105
 
@@ -111,107 +114,107 @@
111
114
  return defaultValue;
112
115
  }
113
116
 
114
- public byte GetByte(string k, byte defaultValue = 0)
117
+ public byte getByte(string k, byte defaultValue = 0)
115
118
  {
116
- return Convert.ToByte(this.Get(k, defaultValue));
119
+ return Convert.ToByte(this.get(k, defaultValue));
117
120
  }
118
121
 
119
- public sbyte GetSByte(string k, sbyte defaultValue = 0)
122
+ public sbyte getSByte(string k, sbyte defaultValue = 0)
120
123
  {
121
- return Convert.ToSByte(this.Get(k, defaultValue));
124
+ return Convert.ToSByte(this.get(k, defaultValue));
122
125
  }
123
126
 
124
- public short GetShort(string k, short defaultValue = 0)
127
+ public short getShort(string k, short defaultValue = 0)
125
128
  {
126
- return Convert.ToInt16(this.Get(k, defaultValue));
129
+ return Convert.ToInt16(this.get(k, defaultValue));
127
130
  }
128
131
 
129
- public int GetInt(string k, int defaultValue = 0)
132
+ public int getInt(string k, int defaultValue = 0)
130
133
  {
131
- return Convert.ToInt32(this.Get(k, defaultValue));
134
+ return Convert.ToInt32(this.get(k, defaultValue));
132
135
  }
133
136
 
134
- public float GetFloat(string k, float defaultValue = 0)
137
+ public float getFloat(string k, float defaultValue = 0)
135
138
  {
136
- return Convert.ToSingle(this.Get(k, defaultValue));
139
+ return Convert.ToSingle(this.get(k, defaultValue));
137
140
  }
138
141
 
139
- public long GetLong(string k, long defaultValue = 0)
142
+ public long getLong(string k, long defaultValue = 0)
140
143
  {
141
- return Convert.ToInt64(this.Get(k, defaultValue));
144
+ return Convert.ToInt64(this.get(k, defaultValue));
142
145
  }
143
146
 
144
- public double GetDouble(string k, double defaultValue = 0)
147
+ public double getDouble(string k, double defaultValue = 0)
145
148
  {
146
- return Convert.ToDouble(this.Get(k, defaultValue));
149
+ return Convert.ToDouble(this.get(k, defaultValue));
147
150
  }
148
151
 
149
- public bool GetBool(string k, bool defaultValue = false)
152
+ public bool getBool(string k, bool defaultValue = false)
150
153
  {
151
- return Convert.ToBoolean(this.Get(k, defaultValue));
154
+ return Convert.ToBoolean(this.get(k, defaultValue));
152
155
  }
153
156
 
154
- public string GetString(string k, string defaultValue = null)
157
+ public string getString(string k, string defaultValue = null)
155
158
  {
156
- return Convert.ToString(this.Get(k, defaultValue));
159
+ return Convert.ToString(this.get(k, defaultValue));
157
160
  }
158
161
 
159
- public object GetObject(string k, object defaultValue = null)
162
+ public object getObject(string k, object defaultValue = null)
160
163
  {
161
- return this.Get(k, defaultValue);
164
+ return this.get(k, defaultValue);
162
165
  }
163
166
 
164
- public T[] GetArray<T>(string k, T[] defaultValue = null)
167
+ public T[] getArray<T>(string k, T[] defaultValue = null)
165
168
  {
166
- var value0 = this.GetGNArray(k);
169
+ var value0 = this.getGNArray(k);
167
170
  if (value0 != null)
168
171
  {
169
- return value0.ToArray<T>();
172
+ return value0.toArray<T>();
170
173
  }
171
174
 
172
175
  return defaultValue;
173
176
  }
174
177
 
175
- public IList<T> GetList<T>(string k, IList<T> defaultValue = null)
178
+ public IList<T> getList<T>(string k, IList<T> defaultValue = null)
176
179
  {
177
- var value0 = this.GetGNArray(k);
180
+ var value0 = this.getGNArray(k);
178
181
  if (value0 != null)
179
182
  {
180
- return value0.ToList<T>();
183
+ return value0.toList<T>();
181
184
  }
182
185
 
183
186
  return defaultValue;
184
187
  }
185
188
 
186
- public GNArray GetGNArray(string k, GNArray defaultValue = null)
189
+ public GNArray getGNArray(string k, GNArray defaultValue = null)
187
190
  {
188
- return (GNArray)this.Get(k, defaultValue);
191
+ return (GNArray)this.get(k, defaultValue);
189
192
  }
190
193
 
191
- public GNHashtable GetGNHashtable(string k, GNHashtable defaultValue = null)
194
+ public GNHashtable getGNHashtable(string k, GNHashtable defaultValue = null)
192
195
  {
193
- return (GNHashtable)this.Get(k, defaultValue);
196
+ return (GNHashtable)this.get(k, defaultValue);
194
197
  }
195
198
 
196
- public override object ToData()
199
+ public override object toData()
197
200
  {
198
201
  var answer = new Dictionary<string, object>();
199
202
 
200
- foreach (var c in this.originObject)
203
+ foreach (var c in this.dict)
201
204
  {
202
- answer.Add(c.Key, CreateGNDataFromUseData(c.Value));
205
+ answer.Add(c.Key, GNData.createDataFromUseData(c.Value));
203
206
  }
204
207
 
205
208
  return answer;
206
209
  }
207
210
 
208
- public override string ToString()
211
+ public override string toString()
209
212
  {
210
213
  var stringBuilder = new StringBuilder();
211
214
  stringBuilder.Append("{");
212
215
 
213
216
  var i = 0;
214
- foreach (var c in this.originObject)
217
+ foreach (var c in this.dict)
215
218
  {
216
219
  if (i != 0) stringBuilder.Append(",");
217
220
 
@@ -228,6 +231,11 @@
228
231
  return stringBuilder.ToString();
229
232
  }
230
233
 
234
+ public override string ToString()
235
+ {
236
+ return this.toString();
237
+ }
238
+
231
239
  }
232
240
 
233
241
  }
@@ -2,7 +2,9 @@
2
2
  {
3
3
  public interface IGNData
4
4
  {
5
- object ToData();
5
+ object toData();
6
+
7
+ string toString();
6
8
 
7
9
  }
8
10
 
@@ -1,22 +1,20 @@
1
1
  namespace XmobiTea.GN.Config
2
2
  {
3
- using System.Collections.Generic;
4
-
5
3
  using UnityEngine;
6
4
 
7
- using XmobiTea.GN.Constant;
8
-
9
5
  public enum PeerSocketVersion
10
6
  {
11
7
  V2_v2 = 0,
12
8
  V2_v3 = 1,
13
9
  V3 = 2,
10
+
14
11
  }
15
-
12
+
16
13
  public enum HttpRequestType
17
14
  {
18
15
  UnityWebRequest = 0,
19
16
  HTTPRequest = 1,
17
+
20
18
  }
21
19
 
22
20
  //[CreateAssetMenu(fileName = GNServerSettings.ResourcesPath, menuName = "GN/GNServerSettings", order = 1)]
@@ -25,79 +23,148 @@
25
23
  public const string ResourcesPath = "GNServerSettings";
26
24
 
27
25
  [SerializeField]
28
- private string _serverAddress = "127.0.0.1";
29
- public string serverAddress => this._serverAddress;
26
+ private string serverAddress = "127.0.0.1";
27
+
28
+ [SerializeField]
29
+ private int serverPort = 2202;
30
30
 
31
31
  [SerializeField]
32
- private int _serverPort = 2202;
33
- public int serverPort => this._serverPort;
32
+ private bool useSsl = false;
34
33
 
35
34
  [SerializeField]
36
- private bool _useSsl = false;
37
- public bool useSsl => this._useSsl;
35
+ private bool useSocket = true;
38
36
 
39
37
  [SerializeField]
40
- private bool _useSocket = true;
41
- public bool useSocket => this._useSocket;
38
+ private bool useHttp = true;
42
39
 
43
40
  [SerializeField]
44
- private bool _useHttp = true;
45
- public bool useHttp => this._useHttp;
41
+ private int sendRate = 20;
46
42
 
47
43
  [SerializeField]
48
- private int _sendRate = 20;
49
- public int sendRate => this._sendRate;
44
+ private int reconnectDelay = 5000;
50
45
 
51
46
  [SerializeField]
52
- private int _reconnectDelay = 5000;
53
- public int reconnectDelay => this._reconnectDelay;
47
+ private float pingInterval = 20000;
54
48
 
55
49
  [SerializeField]
56
- private float _pingInterval = 20000;
57
- public float pingInterval => this._pingInterval;
50
+ private float pingTimeout = 20000;
58
51
 
59
52
  [SerializeField]
60
- private float _pingTimeout = 20000;
61
- public float pingTimeout => this._pingTimeout;
53
+ private string adminSecretKey;
62
54
 
63
55
  [SerializeField]
64
- private PeerSocketVersion _peerSocketVersion = PeerSocketVersion.V3;
65
- public PeerSocketVersion peerSocketVersion => this._peerSocketVersion;
56
+ private string serverSecretKey;
66
57
 
67
58
  [SerializeField]
68
- private List<int> _codeCanSendNotAuthorized = new List<int>() { OperationCode.Debug, OperationCode.GetAppConfig, OperationCode.Login, OperationCode.RegisterAccount };
69
- public List<int> codeCanSendNotAuthorized => this._codeCanSendNotAuthorized;
59
+ private string clientSecretKey;
70
60
 
71
61
  [SerializeField]
72
- private string _gnServerSourcePath = "Template_GN-server";
73
- public string gnServerSourcePath => this._gnServerSourcePath;
62
+ private PeerSocketVersion peerSocketVersion = PeerSocketVersion.V3;
74
63
 
75
64
  [SerializeField]
76
- private HttpRequestType _httpRequestType = HttpRequestType.HTTPRequest;
77
- public HttpRequestType httpRequestType => this._httpRequestType;
65
+ private string gnServerSourcePath = "Template_GN-server";
78
66
 
79
67
  [SerializeField]
80
- private GN.Logger.LogType _logType = GN.Logger.LogType.All;
81
- public GN.Logger.LogType logType => this._logType;
68
+ private HttpRequestType httpRequestType = HttpRequestType.HTTPRequest;
69
+
70
+ [SerializeField]
71
+ private GN.Logger.LogType logType = GN.Logger.LogType.All;
72
+
73
+ public string getServerAddress()
74
+ {
75
+ return this.serverAddress;
76
+ }
77
+
78
+ public int getServerPort()
79
+ {
80
+ return this.serverPort;
81
+ }
82
82
 
83
- public string SocketUrl
83
+ public bool isUseSsl()
84
84
  {
85
- get
86
- {
87
- if (this._serverPort < 0) return string.Format((this._useSsl ? "https" : "http") + "://{0}", this._serverAddress);
88
- else return string.Format((this._useSsl ? "https" : "http") + "://{0}:{1}", this._serverAddress, this._serverPort);
89
- }
85
+ return this.useSsl;
90
86
  }
91
87
 
92
- public string HttpUrl
88
+
89
+ public bool isUseSocket()
90
+ {
91
+ return this.useSocket;
92
+ }
93
+
94
+ public bool isUseHttp()
93
95
  {
94
- get
95
- {
96
- if (this._serverPort < 0) return string.Format((this._useSsl ? "https" : "http") + "://{0}", this._serverAddress);
97
- else return string.Format((this._useSsl ? "https" : "http") + "://{0}:{1}", this._serverAddress, this._serverPort);
98
- }
96
+ return this.useHttp;
97
+ }
98
+
99
+ public int getSendRate()
100
+ {
101
+ return this.sendRate;
102
+ }
103
+
104
+ public int getReconnectDelay()
105
+ {
106
+ return this.reconnectDelay;
107
+ }
108
+
109
+ public float getPingInterval()
110
+ {
111
+ return this.pingInterval;
112
+ }
113
+
114
+ public float getPingTimeout()
115
+ {
116
+ return this.pingTimeout;
117
+ }
118
+
119
+ public string getAdminSecretKey()
120
+ {
121
+ return this.adminSecretKey;
122
+ }
123
+
124
+ public string getServerSecretKey()
125
+ {
126
+ return this.serverSecretKey;
127
+ }
128
+
129
+ public string getClientSecretKey()
130
+ {
131
+ return this.clientSecretKey;
132
+ }
133
+
134
+ public PeerSocketVersion getPeerSocketVersion()
135
+ {
136
+ return this.peerSocketVersion;
137
+ }
138
+
139
+ public string getGNServerSourcePath()
140
+ {
141
+ return this.gnServerSourcePath;
142
+ }
143
+
144
+ public HttpRequestType getHttpRequestType()
145
+ {
146
+ return this.httpRequestType;
147
+ }
148
+
149
+ public GN.Logger.LogType getLogType()
150
+ {
151
+ return this.logType;
152
+ }
153
+
154
+
155
+ public string getSocketUrl()
156
+ {
157
+ if (this.serverPort < 0) return string.Format((this.useSsl ? "https" : "http") + "://{0}", this.serverAddress);
158
+ else return string.Format((this.useSsl ? "https" : "http") + "://{0}:{1}", this.serverAddress, this.serverPort);
159
+ }
160
+
161
+ public string getHttpUrl()
162
+ {
163
+ if (this.serverPort < 0) return string.Format((this.useSsl ? "https" : "http") + "://{0}", this.serverAddress);
164
+ else return string.Format((this.useSsl ? "https" : "http") + "://{0}:{1}", this.serverAddress, this.serverPort);
99
165
  }
100
166
 
101
167
  }
102
168
 
103
169
  }
170
+
@@ -10,6 +10,7 @@
10
10
  public const string APPLICATION_MSGPACK = "application/msgpack";
11
11
 
12
12
  public const string RequestAuthTokenCmd = "a";
13
+ public const string RequestSecretCmd = "s";
13
14
 
14
15
  public const string RequestCmd_MsgPack = "r";
15
16
  public const string ResponseCmd_MsgPack = "r";
@@ -23,5 +24,7 @@
23
24
  public const string File = "f";
24
25
 
25
26
  private Commands() { }
27
+
26
28
  }
29
+
27
30
  }
@@ -2,9 +2,11 @@
2
2
  {
3
3
  public enum FriendStatus
4
4
  {
5
- Friend = 0,
6
- WaitingAccept = 1,
7
- SentRequestAndWaitingAccept = 2,
8
- Unknown = 3,
5
+ Friend = 1,
6
+ WaitingAccept = 2,
7
+ SentRequestAndWaitingAccept = 3,
8
+ NotFriend = 4,
9
+
9
10
  }
11
+
10
12
  }
@@ -4,5 +4,7 @@
4
4
  {
5
5
  AccessToken = 1,
6
6
  IdToken = 2,
7
+
7
8
  }
9
+
8
10
  }
@@ -0,0 +1,12 @@
1
+ namespace XmobiTea.GN.Constant
2
+ {
3
+ public enum GroupStatus
4
+ {
5
+ Member = 1,
6
+ WaitingAccept = 2,
7
+ SentRequestAndWaitingAccept = 3,
8
+ NotMember = 4,
9
+
10
+ }
11
+
12
+ }
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: 54f5dde9dbce9b94189f320fe54968dd
2
+ guid: 779cfd8373db86d4ab9e820c032c1fc0
3
3
  MonoImporter:
4
4
  externalObjects: {}
5
5
  serializedVersion: 2
@@ -2,20 +2,22 @@
2
2
  {
3
3
  public enum InvalidMemberType
4
4
  {
5
- UnknownError = 0,
6
- DataRequired = 1,
7
- TypeInvalid = 2,
8
- StringNull = 3,
9
- StringMinLength = 4,
10
- StringMaxLength = 5,
11
- NumberMinValue = 6,
12
- NumberMaxValue = 7,
13
- NumberMustInt = 8,
14
- GNHashtableNull = 9,
15
- GNHashtableMinLength = 10,
16
- GNHashtableMaxLength = 11,
17
- GNArrayNull = 12,
18
- GNArrayMinLength = 13,
19
- GNArrayMaxLength = 14,
5
+ UnknownError = 1,
6
+ DataRequired = 2,
7
+ TypeInvalid = 3,
8
+ StringNull = 4,
9
+ StringMinLength = 5,
10
+ StringMaxLength = 6,
11
+ NumberMinValue = 7,
12
+ NumberMaxValue = 8,
13
+ NumberMustInt = 9,
14
+ GNHashtableNull = 10,
15
+ GNHashtableMinLength = 11,
16
+ GNHashtableMaxLength = 12,
17
+ GNArrayNull = 13,
18
+ GNArrayMinLength = 14,
19
+ GNArrayMaxLength = 15,
20
+
20
21
  }
22
+
21
23
  }
@@ -0,0 +1,10 @@
1
+ namespace XmobiTea.GN.Constant
2
+ {
3
+ public enum ItemType
4
+ {
5
+ NonComsumable = 1,
6
+ Consumable = 2,
7
+
8
+ }
9
+
10
+ }
@@ -1,5 +1,5 @@
1
1
  fileFormatVersion: 2
2
- guid: c2ae69e2f0c72e74f88c3dc9fe2484c7
2
+ guid: cfc1a2632567b6048807d780f8c82f74
3
3
  MonoImporter:
4
4
  externalObjects: {}
5
5
  serializedVersion: 2
@@ -0,0 +1,11 @@
1
+ namespace XmobiTea.GN.Constant
2
+ {
3
+ public enum MatchmakingMemberStatus
4
+ {
5
+ Pending = 1,
6
+ Joined = 2,
7
+ Canceled = 3,
8
+
9
+ }
10
+
11
+ }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 465b07787b6459042b5f816152f4c094
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 3d0ecb4f8957d344aadaae7e4069f4f0
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,13 @@
1
+ namespace XmobiTea.GN.Constant
2
+ {
3
+ public enum MatchmakingTicketStatus
4
+ {
5
+ WaitingForMembers = 1,
6
+ WaitingForMatch = 2,
7
+ WaitingForServer = 3,
8
+ Matched = 4,
9
+ Canceled = 5,
10
+
11
+ }
12
+
13
+ }