com.xmobitea.changx.gn-unity 2.0.3 → 2.4.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.
- package/Editor/GNServerSettingsEditor.cs +16 -300
- package/Runtime/Common/GNArray.cs +387 -302
- package/Runtime/Common/GNArray.cs.meta +11 -11
- package/Runtime/Common/GNData.cs +61 -48
- package/Runtime/Common/GNData.cs.meta +11 -11
- package/Runtime/Common/GNHashtable.cs +404 -241
- package/Runtime/Common/GNHashtable.cs.meta +11 -11
- package/Runtime/Common/IGNData.cs +20 -11
- package/Runtime/Common/IGNData.cs.meta +11 -11
- package/Runtime/Common.meta +8 -8
- package/Runtime/Config/GNServerSettings.cs +136 -92
- package/Runtime/Config/GNServerSettings.cs.meta +11 -11
- package/Runtime/Config.meta +8 -8
- package/Runtime/Constant/Commands.cs +82 -19
- package/Runtime/Constant/Commands.cs.meta +11 -11
- package/Runtime/Constant/EnumType/FriendStatus.cs +12 -12
- package/Runtime/Constant/EnumType/FriendStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/GoogleLoginType.cs +5 -5
- package/Runtime/Constant/EnumType/GoogleLoginType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/GroupStatus.cs +7 -7
- package/Runtime/Constant/EnumType/GroupStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/InvalidMemberType.cs +23 -23
- package/Runtime/Constant/EnumType/InvalidMemberType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/ItemType.cs +5 -5
- package/Runtime/Constant/EnumType/ItemType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/MatchmakingMemberStatus.cs +6 -6
- package/Runtime/Constant/EnumType/MatchmakingMemberStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/MatchmakingTicketStatus.cs +2 -2
- package/Runtime/Constant/EnumType/MatchmakingTicketStatus.cs.meta +11 -11
- package/Runtime/Constant/EnumType/OwnerType.cs +3 -2
- package/Runtime/Constant/EnumType/OwnerType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/PermissionDataItem.cs +10 -10
- package/Runtime/Constant/EnumType/PermissionDataItem.cs.meta +11 -11
- package/Runtime/Constant/EnumType/PushPlatformType.cs +10 -0
- package/Runtime/Constant/EnumType/PushPlatformType.cs.meta +11 -0
- package/Runtime/Constant/EnumType/RequestRole.cs +11 -11
- package/Runtime/Constant/EnumType/RequestRole.cs.meta +7 -7
- package/Runtime/Constant/EnumType/RequestType.cs +20 -19
- package/Runtime/Constant/EnumType/RequestType.cs.meta +11 -11
- package/Runtime/Constant/EnumType/StoreReceiveType.cs +13 -0
- package/Runtime/Constant/EnumType/StoreReceiveType.cs.meta +11 -0
- package/Runtime/Constant/EnumType.meta +8 -8
- package/Runtime/Constant/ErrorCode/GNErrorCode.cs +53 -48
- package/Runtime/Constant/ErrorCode/GNErrorCode.cs.meta +7 -7
- package/Runtime/Constant/ErrorCode.meta +8 -8
- package/Runtime/Constant/EventCode.cs +43 -16
- package/Runtime/Constant/EventCode.cs.meta +11 -11
- package/Runtime/Constant/OperationCode.cs +249 -211
- package/Runtime/Constant/OperationCode.cs.meta +11 -11
- package/Runtime/Constant/ParameterCode/GNParameterCode.cs +614 -466
- package/Runtime/Constant/ParameterCode/GNParameterCode.cs.meta +11 -11
- package/Runtime/Constant/ParameterCode/ParameterCode.cs +12 -12
- package/Runtime/Constant/ParameterCode/ParameterCode.cs.meta +11 -11
- package/Runtime/Constant/ParameterCode.meta +8 -8
- package/Runtime/Constant/ReturnCode.cs +73 -25
- package/Runtime/Constant/ReturnCode.cs.meta +11 -11
- package/Runtime/Constant.meta +8 -8
- package/Runtime/Entity/DataMember.cs +342 -124
- package/Runtime/Entity/DataMember.cs.meta +11 -11
- package/Runtime/Entity/GNMetadata.cs +72 -27
- package/Runtime/Entity/GNMetadata.cs.meta +11 -11
- package/Runtime/Entity/InvalidMember.cs +52 -33
- package/Runtime/Entity/InvalidMember.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateModels.cs +251 -207
- package/Runtime/Entity/Models/AuthenticateModels.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateRequestModels.cs +153 -131
- package/Runtime/Entity/Models/AuthenticateRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/AuthenticateResponseModels.cs +61 -51
- package/Runtime/Entity/Models/AuthenticateResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerModels.cs +985 -849
- package/Runtime/Entity/Models/CharacterPlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerRequestModels.cs +957 -885
- package/Runtime/Entity/Models/CharacterPlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CharacterPlayerResponseModels.cs +165 -150
- package/Runtime/Entity/Models/CharacterPlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/CloudScriptModels.cs +185 -0
- package/Runtime/Entity/Models/CloudScriptModels.cs.meta +11 -0
- package/Runtime/Entity/Models/CloudScriptRequestModels.cs +134 -0
- package/Runtime/Entity/Models/CloudScriptRequestModels.cs.meta +11 -0
- package/Runtime/Entity/Models/CloudScriptResponseModels.cs +34 -0
- package/Runtime/Entity/Models/CloudScriptResponseModels.cs.meta +11 -0
- package/Runtime/Entity/Models/ContentModels.cs +150 -153
- package/Runtime/Entity/Models/ContentModels.cs.meta +11 -11
- package/Runtime/Entity/Models/ContentRequestModels.cs +129 -129
- package/Runtime/Entity/Models/ContentRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/ContentResponseModels.cs +24 -24
- package/Runtime/Entity/Models/ContentResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardModels.cs +1684 -1156
- package/Runtime/Entity/Models/DashboardModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardRequestModels.cs +220 -147
- package/Runtime/Entity/Models/DashboardRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/DashboardResponseModels.cs +92 -57
- package/Runtime/Entity/Models/DashboardResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerModels.cs +1073 -933
- package/Runtime/Entity/Models/GamePlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerRequestModels.cs +939 -867
- package/Runtime/Entity/Models/GamePlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GamePlayerResponseModels.cs +162 -147
- package/Runtime/Entity/Models/GamePlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GenericModels.cs +102 -102
- package/Runtime/Entity/Models/GenericModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupModels.cs +812 -676
- package/Runtime/Entity/Models/GroupModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupRequestModels.cs +741 -669
- package/Runtime/Entity/Models/GroupRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/GroupResponseModels.cs +129 -114
- package/Runtime/Entity/Models/GroupResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryModels.cs +667 -558
- package/Runtime/Entity/Models/InventoryModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryRequestModels.cs +626 -579
- package/Runtime/Entity/Models/InventoryRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/InventoryResponseModels.cs +109 -99
- package/Runtime/Entity/Models/InventoryResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerModels.cs +1882 -1340
- package/Runtime/Entity/Models/MasterPlayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerRequestModels.cs +1643 -1253
- package/Runtime/Entity/Models/MasterPlayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MasterPlayerResponseModels.cs +293 -213
- package/Runtime/Entity/Models/MasterPlayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerModels.cs +293 -223
- package/Runtime/Entity/Models/MultiplayerModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerRequestModels.cs +199 -149
- package/Runtime/Entity/Models/MultiplayerRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/MultiplayerResponseModels.cs +59 -49
- package/Runtime/Entity/Models/MultiplayerResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryModels.cs +514 -323
- package/Runtime/Entity/Models/StoreInventoryModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryRequestModels.cs +236 -165
- package/Runtime/Entity/Models/StoreInventoryRequestModels.cs.meta +11 -11
- package/Runtime/Entity/Models/StoreInventoryResponseModels.cs +45 -30
- package/Runtime/Entity/Models/StoreInventoryResponseModels.cs.meta +11 -11
- package/Runtime/Entity/Models.meta +8 -8
- package/Runtime/Entity/OperationEvent.cs +111 -75
- package/Runtime/Entity/OperationEvent.cs.meta +11 -11
- package/Runtime/Entity/OperationHelper.cs +51 -35
- package/Runtime/Entity/OperationHelper.cs.meta +11 -11
- package/Runtime/Entity/OperationRequest.cs +142 -99
- package/Runtime/Entity/OperationRequest.cs.meta +11 -11
- package/Runtime/Entity/OperationResponse.cs +111 -63
- package/Runtime/Entity/OperationResponse.cs.meta +11 -11
- package/Runtime/Entity/Request/CustomOperationRequest.cs +112 -61
- package/Runtime/Entity/Request/CustomOperationRequest.cs.meta +11 -11
- package/Runtime/Entity/Request.meta +8 -8
- package/Runtime/Entity/Response/CustomOperationResponse.cs +84 -63
- package/Runtime/Entity/Response/CustomOperationResponse.cs.meta +11 -11
- package/Runtime/Entity/Response.meta +8 -8
- package/Runtime/Entity.meta +8 -8
- package/Runtime/GNNetwork.cs +501 -182
- package/Runtime/GNNetwork.cs.meta +11 -11
- package/Runtime/GNNetworkApi.cs +38 -19
- package/Runtime/GNNetworkApi.cs.meta +11 -11
- package/Runtime/GNNetworkAuthenticateApi.cs +531 -98
- package/Runtime/GNNetworkAuthenticateApi.cs.meta +11 -11
- package/Runtime/GNNetworkCharacterPlayerApi.cs +1587 -762
- package/Runtime/GNNetworkCharacterPlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkCloudScriptApi.cs +181 -0
- package/Runtime/GNNetworkCloudScriptApi.cs.meta +11 -0
- package/Runtime/GNNetworkContentApi.cs +238 -132
- package/Runtime/GNNetworkContentApi.cs.meta +11 -11
- package/Runtime/GNNetworkDashboardApi.cs +278 -117
- package/Runtime/GNNetworkDashboardApi.cs.meta +11 -11
- package/Runtime/GNNetworkGamePlayerApi.cs +1558 -747
- package/Runtime/GNNetworkGamePlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkGroupApi.cs +1228 -582
- package/Runtime/GNNetworkGroupApi.cs.meta +11 -11
- package/Runtime/GNNetworkInventoryApi.cs +1048 -507
- package/Runtime/GNNetworkInventoryApi.cs.meta +11 -11
- package/Runtime/GNNetworkMasterPlayerApi.cs +2586 -1067
- package/Runtime/GNNetworkMasterPlayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkMultiplayerApi.cs +328 -147
- package/Runtime/GNNetworkMultiplayerApi.cs.meta +11 -11
- package/Runtime/GNNetworkStoreInventoryApi.cs +388 -162
- package/Runtime/GNNetworkStoreInventoryApi.cs.meta +11 -11
- package/Runtime/Helper/CodeHelper.cs +140 -98
- package/Runtime/Helper/CodeHelper.cs.meta +11 -11
- package/Runtime/Helper/ConverterService.cs +236 -52
- package/Runtime/Helper/ConverterService.cs.meta +11 -11
- package/Runtime/Helper/ParseGNHelper.cs +451 -451
- package/Runtime/Helper/ParseGNHelper.cs.meta +11 -11
- package/Runtime/Helper.meta +8 -8
- package/Runtime/Logger/GNDebug.cs +92 -49
- package/Runtime/Logger/GNDebug.cs.meta +11 -11
- package/Runtime/Logger.meta +8 -8
- package/Runtime/Networking/AuthenticateStatus.cs +57 -35
- package/Runtime/Networking/AuthenticateStatus.cs.meta +11 -11
- package/Runtime/Networking/Handler/IServerEventHandler.cs +25 -25
- package/Runtime/Networking/Handler/IServerEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnCharacterPlayerFriendUpdateEventHandler.cs +61 -32
- package/Runtime/Networking/Handler/OnCharacterPlayerFriendUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs +54 -33
- package/Runtime/Networking/Handler/OnCharacterPlayerGroupUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs +54 -32
- package/Runtime/Networking/Handler/OnGamePlayerFriendUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs +54 -32
- package/Runtime/Networking/Handler/OnGamePlayerGroupUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs +48 -29
- package/Runtime/Networking/Handler/OnGroupMemberUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs +47 -29
- package/Runtime/Networking/Handler/OnGroupMessageUpdateEventHandler.cs.meta +11 -11
- package/Runtime/Networking/Handler.meta +8 -8
- package/Runtime/Networking/Http/HttpPeer.cs +68 -25
- package/Runtime/Networking/Http/HttpPeer.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs +65 -25
- package/Runtime/Networking/Http/NetworkingHttpPeerBase.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs +513 -486
- package/Runtime/Networking/Http/NetworkingPeerHttpClientRequest.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs +172 -142
- package/Runtime/Networking/Http/NetworkingPeerHttpRequest.cs.meta +11 -11
- package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs +225 -188
- package/Runtime/Networking/Http/NetworkingPeerUnityWebRequest.cs.meta +11 -11
- package/Runtime/Networking/Http.meta +8 -8
- package/Runtime/Networking/IPeer.cs +41 -19
- package/Runtime/Networking/IPeer.cs.meta +11 -11
- package/Runtime/Networking/NetworkingPeer.cs +198 -144
- package/Runtime/Networking/NetworkingPeer.cs.meta +11 -11
- package/Runtime/Networking/NetworkingPeerAPI.cs +20 -21
- package/Runtime/Networking/NetworkingPeerAPI.cs.meta +11 -11
- package/Runtime/Networking/OperationPending.cs +159 -95
- package/Runtime/Networking/OperationPending.cs.meta +11 -11
- package/Runtime/Networking/PeerBase.cs +305 -242
- package/Runtime/Networking/PeerBase.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingPeerSocketV2.cs +222 -185
- package/Runtime/Networking/Socket/NetworkingPeerSocketV2.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingPeerSocketV3.cs +235 -177
- package/Runtime/Networking/Socket/NetworkingPeerSocketV3.cs.meta +11 -11
- package/Runtime/Networking/Socket/NetworkingSocketPeerBase.cs +165 -23
- package/Runtime/Networking/Socket/NetworkingSocketPeerBase.cs.meta +11 -11
- package/Runtime/Networking/Socket/SocketPeer.cs +242 -197
- package/Runtime/Networking/Socket/SocketPeer.cs.meta +11 -11
- package/Runtime/Networking/Socket.meta +8 -8
- package/Runtime/Networking.meta +8 -8
- package/Runtime/Unity/ServiceCoroutine.cs +10 -0
- package/Runtime/Unity/ServiceCoroutine.cs.meta +11 -0
- package/Runtime/Unity/ServiceUpdate.cs +33 -20
- package/Runtime/Unity/ServiceUpdate.cs.meta +11 -11
- package/Runtime/Unity.meta +8 -8
- package/Runtime/XmobiTea.GN.runtime.asmdef +16 -16
- package/Runtime/XmobiTea.GN.runtime.asmdef.meta +7 -7
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: b12e8b46be45df044adf765876a2dc79
|
|
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: b12e8b46be45df044adf765876a2dc79
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Common
|
|
2
|
-
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
namespace XmobiTea.GN.Common
|
|
2
|
+
{
|
|
3
|
+
/// <summary>
|
|
4
|
+
/// Interface defining the structure for GNData objects.
|
|
5
|
+
/// </summary>
|
|
6
|
+
public interface IGNData
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
/// Converts the current GNData object into a serializable data format.
|
|
10
|
+
/// </summary>
|
|
11
|
+
/// <returns>A serializable representation of the GNData object.</returns>
|
|
12
|
+
object toData();
|
|
13
|
+
|
|
14
|
+
/// <summary>
|
|
15
|
+
/// Converts the current GNData object into a string representation.
|
|
16
|
+
/// </summary>
|
|
17
|
+
/// <returns>A string representation of the GNData object.</returns>
|
|
18
|
+
string toString();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 5274c9bb50388574d9fbb33cc2c152ec
|
|
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: 5274c9bb50388574d9fbb33cc2c152ec
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/Runtime/Common.meta
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: b7214dcb9e233e54b977c23f3c78b4e2
|
|
3
|
-
folderAsset: yes
|
|
4
|
-
DefaultImporter:
|
|
5
|
-
externalObjects: {}
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: b7214dcb9e233e54b977c23f3c78b4e2
|
|
3
|
+
folderAsset: yes
|
|
4
|
+
DefaultImporter:
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|
|
@@ -2,25 +2,53 @@
|
|
|
2
2
|
{
|
|
3
3
|
using UnityEngine;
|
|
4
4
|
|
|
5
|
+
/// <summary>
|
|
6
|
+
/// Enum for specifying the peer socket version.
|
|
7
|
+
/// </summary>
|
|
5
8
|
public enum PeerSocketVersion
|
|
6
9
|
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
/// Socket.IO version 2 with protocol v2.
|
|
12
|
+
/// </summary>
|
|
7
13
|
V2_v2 = 0,
|
|
14
|
+
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// Socket.IO version 2 with protocol v3.
|
|
17
|
+
/// </summary>
|
|
8
18
|
V2_v3 = 1,
|
|
9
|
-
V3 = 2,
|
|
10
19
|
|
|
20
|
+
/// <summary>
|
|
21
|
+
/// Socket.IO version 3.
|
|
22
|
+
/// </summary>
|
|
23
|
+
V3 = 2,
|
|
11
24
|
}
|
|
12
25
|
|
|
26
|
+
/// <summary>
|
|
27
|
+
/// Enum for specifying the HTTP request type.
|
|
28
|
+
/// </summary>
|
|
13
29
|
public enum HttpRequestType
|
|
14
30
|
{
|
|
31
|
+
/// <summary>
|
|
32
|
+
/// UnityWebRequest for HTTP requests.
|
|
33
|
+
/// </summary>
|
|
15
34
|
UnityWebRequest = 0,
|
|
16
35
|
|
|
17
36
|
#if UNITY_USING_BEST_HTTP
|
|
37
|
+
/// <summary>
|
|
38
|
+
/// BestHTTP library for HTTP requests.
|
|
39
|
+
/// </summary>
|
|
18
40
|
HTTPRequest = 1,
|
|
19
41
|
#endif
|
|
20
42
|
|
|
43
|
+
/// <summary>
|
|
44
|
+
/// HttpWebRequest for HTTP requests.
|
|
45
|
+
/// </summary>
|
|
21
46
|
HttpWebRequest = 2,
|
|
22
47
|
}
|
|
23
48
|
|
|
49
|
+
/// <summary>
|
|
50
|
+
/// GN Server settings configuration.
|
|
51
|
+
/// </summary>
|
|
24
52
|
//[CreateAssetMenu(fileName = GNServerSettings.ResourcesPath, menuName = "GN/GNServerSettings", order = 1)]
|
|
25
53
|
public class GNServerSettings : ScriptableObject
|
|
26
54
|
{
|
|
@@ -71,96 +99,112 @@
|
|
|
71
99
|
[SerializeField]
|
|
72
100
|
private GN.Logger.LogType logType = GN.Logger.LogType.All;
|
|
73
101
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
public
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
public bool
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
public
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
102
|
+
/// <summary>
|
|
103
|
+
/// Gets the server address.
|
|
104
|
+
/// </summary>
|
|
105
|
+
/// <returns>The server address.</returns>
|
|
106
|
+
public string getServerAddress() => this.serverAddress;
|
|
107
|
+
|
|
108
|
+
/// <summary>
|
|
109
|
+
/// Gets the server port.
|
|
110
|
+
/// </summary>
|
|
111
|
+
/// <returns>The server port.</returns>
|
|
112
|
+
public int getServerPort() => this.serverPort;
|
|
113
|
+
|
|
114
|
+
/// <summary>
|
|
115
|
+
/// Indicates whether SSL is used.
|
|
116
|
+
/// </summary>
|
|
117
|
+
/// <returns>True if SSL is used; otherwise, false.</returns>
|
|
118
|
+
public bool isUseSsl() => this.useSsl;
|
|
119
|
+
|
|
120
|
+
/// <summary>
|
|
121
|
+
/// Indicates whether socket communication is enabled.
|
|
122
|
+
/// </summary>
|
|
123
|
+
/// <returns>True if socket is used; otherwise, false.</returns>
|
|
124
|
+
public bool isUseSocket() => this.useSocket;
|
|
125
|
+
|
|
126
|
+
/// <summary>
|
|
127
|
+
/// Indicates whether HTTP communication is enabled.
|
|
128
|
+
/// </summary>
|
|
129
|
+
/// <returns>True if HTTP is used; otherwise, false.</returns>
|
|
130
|
+
public bool isUseHttp() => this.useHttp;
|
|
131
|
+
|
|
132
|
+
/// <summary>
|
|
133
|
+
/// Gets the message send rate.
|
|
134
|
+
/// </summary>
|
|
135
|
+
/// <returns>The send rate.</returns>
|
|
136
|
+
public int getSendRate() => this.sendRate;
|
|
137
|
+
|
|
138
|
+
/// <summary>
|
|
139
|
+
/// Gets the reconnect delay in milliseconds.
|
|
140
|
+
/// </summary>
|
|
141
|
+
/// <returns>The reconnect delay.</returns>
|
|
142
|
+
public int getReconnectDelay() => this.reconnectDelay;
|
|
143
|
+
|
|
144
|
+
/// <summary>
|
|
145
|
+
/// Gets the ping interval in milliseconds.
|
|
146
|
+
/// </summary>
|
|
147
|
+
/// <returns>The ping interval.</returns>
|
|
148
|
+
public float getPingInterval() => this.pingInterval;
|
|
149
|
+
|
|
150
|
+
/// <summary>
|
|
151
|
+
/// Gets the ping timeout in milliseconds.
|
|
152
|
+
/// </summary>
|
|
153
|
+
/// <returns>The ping timeout.</returns>
|
|
154
|
+
public float getPingTimeout() => this.pingTimeout;
|
|
155
|
+
|
|
156
|
+
/// <summary>
|
|
157
|
+
/// Gets the admin secret key.
|
|
158
|
+
/// </summary>
|
|
159
|
+
/// <returns>The admin secret key.</returns>
|
|
160
|
+
public string getAdminSecretKey() => this.adminSecretKey;
|
|
161
|
+
|
|
162
|
+
/// <summary>
|
|
163
|
+
/// Gets the server secret key.
|
|
164
|
+
/// </summary>
|
|
165
|
+
/// <returns>The server secret key.</returns>
|
|
166
|
+
public string getServerSecretKey() => this.serverSecretKey;
|
|
167
|
+
|
|
168
|
+
/// <summary>
|
|
169
|
+
/// Gets the client secret key.
|
|
170
|
+
/// </summary>
|
|
171
|
+
/// <returns>The client secret key.</returns>
|
|
172
|
+
public string getClientSecretKey() => this.clientSecretKey;
|
|
173
|
+
|
|
174
|
+
/// <summary>
|
|
175
|
+
/// Gets the peer socket version.
|
|
176
|
+
/// </summary>
|
|
177
|
+
/// <returns>The peer socket version.</returns>
|
|
178
|
+
public PeerSocketVersion getPeerSocketVersion() => this.peerSocketVersion;
|
|
179
|
+
|
|
180
|
+
/// <summary>
|
|
181
|
+
/// Gets the HTTP request type.
|
|
182
|
+
/// </summary>
|
|
183
|
+
/// <returns>The HTTP request type.</returns>
|
|
184
|
+
public HttpRequestType getHttpRequestType() => this.httpRequestType;
|
|
185
|
+
|
|
186
|
+
/// <summary>
|
|
187
|
+
/// Gets the log type.
|
|
188
|
+
/// </summary>
|
|
189
|
+
/// <returns>The log type.</returns>
|
|
190
|
+
public GN.Logger.LogType getLogType() => this.logType;
|
|
191
|
+
|
|
192
|
+
/// <summary>
|
|
193
|
+
/// Constructs the socket URL.
|
|
194
|
+
/// </summary>
|
|
195
|
+
/// <returns>The socket URL.</returns>
|
|
196
|
+
public string getSocketUrl() =>
|
|
197
|
+
this.serverPort < 0
|
|
198
|
+
? $"{(this.useSsl ? "https" : "http")}://{this.serverAddress}"
|
|
199
|
+
: $"{(this.useSsl ? "https" : "http")}://{this.serverAddress}:{this.serverPort}";
|
|
200
|
+
|
|
201
|
+
/// <summary>
|
|
202
|
+
/// Constructs the HTTP URL.
|
|
203
|
+
/// </summary>
|
|
204
|
+
/// <returns>The HTTP URL.</returns>
|
|
205
|
+
public string getHttpUrl() =>
|
|
206
|
+
this.serverPort < 0
|
|
207
|
+
? $"{(this.useSsl ? "https" : "http")}://{this.serverAddress}"
|
|
208
|
+
: $"{(this.useSsl ? "https" : "http")}://{this.serverAddress}:{this.serverPort}";
|
|
163
209
|
}
|
|
164
|
-
|
|
165
210
|
}
|
|
166
|
-
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 1f5a0d671baecc84a96081fada3dd9e4
|
|
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: 1f5a0d671baecc84a96081fada3dd9e4
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/Runtime/Config.meta
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: ffaf78f72b4123b4aa40cc27bc08417f
|
|
3
|
-
folderAsset: yes
|
|
4
|
-
DefaultImporter:
|
|
5
|
-
externalObjects: {}
|
|
6
|
-
userData:
|
|
7
|
-
assetBundleName:
|
|
8
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: ffaf78f72b4123b4aa40cc27bc08417f
|
|
3
|
+
folderAsset: yes
|
|
4
|
+
DefaultImporter:
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
userData:
|
|
7
|
+
assetBundleName:
|
|
8
|
+
assetBundleVariant:
|
|
@@ -1,30 +1,93 @@
|
|
|
1
1
|
namespace XmobiTea.GN.Constant
|
|
2
2
|
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/// <summary>
|
|
4
|
+
/// Holds constant values used throughout the GN networking system.
|
|
5
|
+
/// </summary>
|
|
6
|
+
public class Commands
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
/// HTTP header key for specifying the user agent.
|
|
10
|
+
/// </summary>
|
|
11
|
+
public const string USER_AGENT = "User-Agent";
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
/// <summary>
|
|
14
|
+
/// HTTP header key for specifying the content type.
|
|
15
|
+
/// </summary>
|
|
16
|
+
public const string CONTENT_TYPE = "Content-Type";
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
/// <summary>
|
|
19
|
+
/// HTTP header key for specifying the content length.
|
|
20
|
+
/// </summary>
|
|
21
|
+
public const string CONTENT_LENGTH = "Content-Length";
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
23
|
+
/// <summary>
|
|
24
|
+
/// MIME type for JSON content.
|
|
25
|
+
/// </summary>
|
|
26
|
+
public const string APPLICATION_JSON = "application/json";
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
/// <summary>
|
|
29
|
+
/// MIME type for MsgPack content.
|
|
30
|
+
/// </summary>
|
|
31
|
+
public const string APPLICATION_MSGPACK = "application/msgpack";
|
|
22
32
|
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
/// <summary>
|
|
34
|
+
/// Key for the authentication token in requests.
|
|
35
|
+
/// </summary>
|
|
36
|
+
public const string RequestAuthTokenCmd = "a";
|
|
25
37
|
|
|
26
|
-
|
|
38
|
+
/// <summary>
|
|
39
|
+
/// Key for the secret key in requests.
|
|
40
|
+
/// </summary>
|
|
41
|
+
public const string RequestSecretCmd = "s";
|
|
27
42
|
|
|
28
|
-
|
|
43
|
+
/// <summary>
|
|
44
|
+
/// Key for the gameId key in requests.
|
|
45
|
+
/// </summary>
|
|
46
|
+
public const string RequestGameIdCmd = "g";
|
|
29
47
|
|
|
48
|
+
/// <summary>
|
|
49
|
+
/// Key for MsgPack request commands.
|
|
50
|
+
/// </summary>
|
|
51
|
+
public const string RequestCmd_MsgPack = "r";
|
|
52
|
+
|
|
53
|
+
/// <summary>
|
|
54
|
+
/// Key for MsgPack response commands.
|
|
55
|
+
/// </summary>
|
|
56
|
+
public const string ResponseCmd_MsgPack = "r";
|
|
57
|
+
|
|
58
|
+
/// <summary>
|
|
59
|
+
/// Key for MsgPack event commands.
|
|
60
|
+
/// </summary>
|
|
61
|
+
public const string EventCmd_MsgPack = "e";
|
|
62
|
+
|
|
63
|
+
/// <summary>
|
|
64
|
+
/// Key for JSON request commands.
|
|
65
|
+
/// </summary>
|
|
66
|
+
public const string RequestCmd_Json = "t";
|
|
67
|
+
|
|
68
|
+
/// <summary>
|
|
69
|
+
/// Key for JSON response commands.
|
|
70
|
+
/// </summary>
|
|
71
|
+
public const string ResponseCmd_Json = "t";
|
|
72
|
+
|
|
73
|
+
/// <summary>
|
|
74
|
+
/// Key for JSON event commands.
|
|
75
|
+
/// </summary>
|
|
76
|
+
public const string EventCmd_Json = "y";
|
|
77
|
+
|
|
78
|
+
/// <summary>
|
|
79
|
+
/// General key for data fields.
|
|
80
|
+
/// </summary>
|
|
81
|
+
public const string Data = "d";
|
|
82
|
+
|
|
83
|
+
/// <summary>
|
|
84
|
+
/// Key for file fields.
|
|
85
|
+
/// </summary>
|
|
86
|
+
public const string File = "f";
|
|
87
|
+
|
|
88
|
+
/// <summary>
|
|
89
|
+
/// Private constructor to prevent instantiation of this utility class.
|
|
90
|
+
/// </summary>
|
|
91
|
+
private Commands() { }
|
|
92
|
+
}
|
|
30
93
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: ceac771235ac3ad43b6c9eb215cf1b7d
|
|
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: ceac771235ac3ad43b6c9eb215cf1b7d
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
namespace XmobiTea.GN.Constant
|
|
2
|
-
{
|
|
3
|
-
public enum FriendStatus
|
|
4
|
-
{
|
|
5
|
-
Friend = 1,
|
|
6
|
-
WaitingAccept = 2,
|
|
7
|
-
SentRequestAndWaitingAccept = 3,
|
|
8
|
-
NotFriend = 4,
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
}
|
|
1
|
+
namespace XmobiTea.GN.Constant
|
|
2
|
+
{
|
|
3
|
+
public enum FriendStatus
|
|
4
|
+
{
|
|
5
|
+
Friend = 1,
|
|
6
|
+
WaitingAccept = 2,
|
|
7
|
+
SentRequestAndWaitingAccept = 3,
|
|
8
|
+
NotFriend = 4,
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 2c9ae4fd7faaae7488a70ea9a538f38c
|
|
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: 2c9ae4fd7faaae7488a70ea9a538f38c
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 4576809c05f4d1642889f463afce2d0b
|
|
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: 4576809c05f4d1642889f463afce2d0b
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
namespace XmobiTea.GN.Constant
|
|
2
2
|
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
public enum GroupStatus
|
|
4
|
+
{
|
|
5
|
+
Member = 1,
|
|
6
|
+
WaitingAccept = 2,
|
|
7
|
+
SentRequestAndWaitingAccept = 3,
|
|
8
|
+
NotMember = 4,
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
}
|
|
11
11
|
|
|
12
12
|
}
|