服务器相关
This commit is contained in:
parent
e7ad09e7eb
commit
d2c2334ac8
@ -1,33 +0,0 @@
|
|||||||
using NoSugarNet.ClientCore.Manager;
|
|
||||||
using NoSugarNet.ClientCore.Network;
|
|
||||||
using ServerCore.Manager;
|
|
||||||
|
|
||||||
namespace NoSugarNet.ClientCore
|
|
||||||
{
|
|
||||||
public class App
|
|
||||||
{
|
|
||||||
public static string TokenStr;
|
|
||||||
public static long RID = -1;
|
|
||||||
public static string IP;
|
|
||||||
public static int Port;
|
|
||||||
public static LogManager log;
|
|
||||||
public static NetworkHelper networkHelper;
|
|
||||||
public static AppLogin login;
|
|
||||||
public static AppChat chat;
|
|
||||||
public static AppLocalClient local;
|
|
||||||
public static UserDataManager user;
|
|
||||||
|
|
||||||
public static void Init(string IP, int port)
|
|
||||||
{
|
|
||||||
log = new LogManager();
|
|
||||||
networkHelper = new NetworkHelper();
|
|
||||||
login = new AppLogin();
|
|
||||||
chat = new AppChat();
|
|
||||||
local = new AppLocalClient();
|
|
||||||
user = new UserDataManager();
|
|
||||||
networkHelper.Init(IP, port);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -27,6 +27,15 @@ namespace ServerCore.Manager
|
|||||||
});
|
});
|
||||||
|
|
||||||
ServerManager.g_ClientMgr.ClientSend(cinfo, (int)CommandID.CmdLogin, (int)ErrorCode.ErrorOk, respData);
|
ServerManager.g_ClientMgr.ClientSend(cinfo, (int)CommandID.CmdLogin, (int)ErrorCode.ErrorOk, respData);
|
||||||
|
|
||||||
|
Protobuf_Cfgs cfgsSP = new Protobuf_Cfgs();
|
||||||
|
cfgsSP.Cfgs.Add(new Protobuf_Cfgs_Single { TunnelID = 0, IP = "127.0.0.1", Port = 10001 });
|
||||||
|
cfgsSP.Cfgs.Add(new Protobuf_Cfgs_Single { TunnelID = 1, IP = "127.0.0.1", Port = 10002 });
|
||||||
|
cfgsSP.Cfgs.Add(new Protobuf_Cfgs_Single { TunnelID = 2, IP = "127.0.0.1", Port = 10003 });
|
||||||
|
cfgsSP.Cfgs.Add(new Protobuf_Cfgs_Single { TunnelID = 3, IP = "127.0.0.1", Port = 10004 });
|
||||||
|
|
||||||
|
byte[] respDataCfg = ProtoBufHelper.Serizlize(cfgsSP);
|
||||||
|
ServerManager.g_ClientMgr.ClientSend(cinfo, (int)CommandID.CmdCfgs, (int)ErrorCode.ErrorOk, respDataCfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
@ -10,6 +10,9 @@
|
|||||||
<Reference Include="Google.Protobuf">
|
<Reference Include="Google.Protobuf">
|
||||||
<HintPath>..\Lib\Google.Protobuf.dll</HintPath>
|
<HintPath>..\Lib\Google.Protobuf.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="HaoYueNet.ClientNetwork">
|
||||||
|
<HintPath>..\Lib\HaoYueNet.ClientNetwork.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="HaoYueNet.ServerNetwork">
|
<Reference Include="HaoYueNet.ServerNetwork">
|
||||||
<HintPath>..\Lib\HaoYueNet.ServerNetwork.dll</HintPath>
|
<HintPath>..\Lib\HaoYueNet.ServerNetwork.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
@ -5,11 +5,21 @@ VisualStudioVersion = 17.7.34031.279
|
|||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{EDA9D3FD-1A72-434D-81F6-B1B420406D20}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{EDA9D3FD-1A72-434D-81F6-B1B420406D20}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
Lib\Google.Protobuf.dll = Lib\Google.Protobuf.dll
|
||||||
|
Lib\HaoYueNet.ClientNetwork.dll = Lib\HaoYueNet.ClientNetwork.dll
|
||||||
Lib\HaoYueNet.ServerNetwork.dll = Lib\HaoYueNet.ServerNetwork.dll
|
Lib\HaoYueNet.ServerNetwork.dll = Lib\HaoYueNet.ServerNetwork.dll
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoSugarNet.ServerCore", "NoSugarNet.ServerCore\NoSugarNet.ServerCore.csproj", "{25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoSugarNet.ServerCore", "NoSugarNet.ServerCore\NoSugarNet.ServerCore.csproj", "{25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoSugarNet.ClientCore", "NoSugarNet.ClientCore\NoSugarNet.ClientCore.csproj", "{80AF9D64-681C-4B6F-B2FF-5DD847186749}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{5E65F25A-8B59-4FC7-8582-C6887C3CD0A1}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoSugarNet.ClientCli", "Sample\NoSugarNet.ClientCli\NoSugarNet.ClientCli.csproj", "{29D76CF3-BF7E-45A5-9957-2CBC0A41B6FB}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoSugarNet.ServerCli", "Sample\NoSugarNet.ServerCli\NoSugarNet.ServerCli.csproj", "{65220036-9A81-49FA-A5BC-DA06783D2E52}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@ -20,10 +30,26 @@ Global
|
|||||||
{25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}.Release|Any CPU.Build.0 = Release|Any CPU
|
{25FB6F12-4619-4D2C-8FC1-70AAAA8AD100}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{80AF9D64-681C-4B6F-B2FF-5DD847186749}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{80AF9D64-681C-4B6F-B2FF-5DD847186749}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{80AF9D64-681C-4B6F-B2FF-5DD847186749}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{80AF9D64-681C-4B6F-B2FF-5DD847186749}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{29D76CF3-BF7E-45A5-9957-2CBC0A41B6FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{29D76CF3-BF7E-45A5-9957-2CBC0A41B6FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{29D76CF3-BF7E-45A5-9957-2CBC0A41B6FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{29D76CF3-BF7E-45A5-9957-2CBC0A41B6FB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{65220036-9A81-49FA-A5BC-DA06783D2E52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{65220036-9A81-49FA-A5BC-DA06783D2E52}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{65220036-9A81-49FA-A5BC-DA06783D2E52}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{65220036-9A81-49FA-A5BC-DA06783D2E52}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{29D76CF3-BF7E-45A5-9957-2CBC0A41B6FB} = {5E65F25A-8B59-4FC7-8582-C6887C3CD0A1}
|
||||||
|
{65220036-9A81-49FA-A5BC-DA06783D2E52} = {5E65F25A-8B59-4FC7-8582-C6887C3CD0A1}
|
||||||
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {637DC2BB-F9BB-41A2-ADC0-B41B871F66DE}
|
SolutionGuid = {637DC2BB-F9BB-41A2-ADC0-B41B871F66DE}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
Loading…
Reference in New Issue
Block a user