更新:demo引用版本

This commit is contained in:
若汝棋茗
2025-02-15 13:19:03 +08:00
parent 45dab92a22
commit 7a5c811e7e
119 changed files with 2113 additions and 797 deletions

View File

@@ -6,6 +6,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,6 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -9,6 +9,6 @@
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -82,16 +82,8 @@ namespace BetweenAndConsoleApp
}
}
/// <summary>
/// 以**12##12##Min=5为例。
/// </summary>
class MyBetweenAndRequestInfo : IRequestInfo
{
public MyBetweenAndRequestInfo()
{
}
public MyBetweenAndRequestInfo(byte[] body)
{
this.Body = body;

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -9,12 +9,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,12 +8,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,12 +8,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,6 +6,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,12 +6,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,12 +6,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,11 +6,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,12 +7,12 @@
<ItemGroup>
<PackageReference Include="Consul" Version="1.7.14.7" />
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,12 +7,12 @@
<ItemGroup>
<PackageReference Include="Consul" Version="1.7.14.7" />
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,12 +8,12 @@
<ItemGroup>
<PackageReference Include="Consul" Version="1.7.14.7" />
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -9,11 +9,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -5,11 +5,11 @@
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -17,6 +17,6 @@
</ItemGroup>-->
<ItemGroup>
<PackageReference Include="TouchSocket.Core" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Core" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,8 +7,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Core" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Core.DependencyInjection" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Core" Version="3.0.14" />
<PackageReference Include="TouchSocket.Core.DependencyInjection" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -9,12 +9,12 @@
<ItemGroup>
<PackageReference Include="log4net" Version="3.0.3" />
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
<ItemGroup>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,11 +6,11 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,6 +6,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Core" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Core" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,6 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -26,7 +26,7 @@
</ItemGroup>-->
<ItemGroup>
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -33,13 +33,7 @@ namespace DmtpConsoleApp
await action.RunCommandLineAsync();
}
async Task Test()
{
}
private static void Action_OnException(Exception obj)
{
Console.WriteLine(obj.Message);

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,11 +6,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -12,6 +12,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,8 +7,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.AspNetCore" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.AspNetCore" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.AspNetCore" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.AspNetCore" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -35,6 +35,6 @@
</Reference>
</ItemGroup>-->
<ItemGroup>
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,12 +8,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
<ItemGroup>

View File

@@ -10,11 +10,11 @@
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,11 +6,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,6 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,12 +8,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
</ItemGroup>
<ItemGroup>

View File

@@ -8,12 +8,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,12 +6,12 @@
<ItemGroup>
<PackageReference Include="MemoryPack" Version="1.21.3" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,12 +7,12 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SerializationSelectorClassLibrary\SerializationSelectorClassLibrary.csproj" />

View File

@@ -180,8 +180,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NamedPipeServiceConsoleApp"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NamedPipeClientConsoleApp", "NamedPipe\NamedPipeClientConsoleApp\NamedPipeClientConsoleApp.csproj", "{89C3B730-4024-4C76-8CB0-FAA8BF0945B9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnityServerConsoleApp", "Unity3d\UnityServerConsoleApp\UnityServerConsoleApp.csproj", "{E109E848-54D2-4BCE-808E-F5F3844A1B1D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Rpc", "Rpc", "{D01CF5F0-67D0-44E3-B7CE-0BAD4F475C0E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GenerateProxyFromServerConsoleApp", "Rpc\GenerateProxyFromServerConsoleApp\GenerateProxyFromServerConsoleApp.csproj", "{09ABC5EB-0896-4693-A057-A03B35E0294C}"
@@ -301,6 +299,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomJsonDataHandlingAdapt
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomCountSpliterDataHandlingAdapterConsoleApp", "Adapter\CustomCountSpliterDataHandlingAdapterConsoleApp\CustomCountSpliterDataHandlingAdapterConsoleApp.csproj", "{3A76B68F-7C8B-4310-BE2F-434B714DE3F7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityServerConsoleApp_All", "Unity3d\UnityServerConsoleApp_All\UnityServerConsoleApp_All.csproj", "{135C1BF2-2097-60BD-377A-41A9F80EB060}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityServerConsoleApp_2D", "Unity3d\UnityServerConsoleApp_2D\UnityServerConsoleApp_2D.csproj", "{81D2B2B1-0A9C-E81D-789A-A9C2C21FD03E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -499,10 +501,6 @@ Global
{89C3B730-4024-4C76-8CB0-FAA8BF0945B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89C3B730-4024-4C76-8CB0-FAA8BF0945B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89C3B730-4024-4C76-8CB0-FAA8BF0945B9}.Release|Any CPU.Build.0 = Release|Any CPU
{E109E848-54D2-4BCE-808E-F5F3844A1B1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E109E848-54D2-4BCE-808E-F5F3844A1B1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E109E848-54D2-4BCE-808E-F5F3844A1B1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E109E848-54D2-4BCE-808E-F5F3844A1B1D}.Release|Any CPU.Build.0 = Release|Any CPU
{09ABC5EB-0896-4693-A057-A03B35E0294C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09ABC5EB-0896-4693-A057-A03B35E0294C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09ABC5EB-0896-4693-A057-A03B35E0294C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -679,6 +677,14 @@ Global
{3A76B68F-7C8B-4310-BE2F-434B714DE3F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3A76B68F-7C8B-4310-BE2F-434B714DE3F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3A76B68F-7C8B-4310-BE2F-434B714DE3F7}.Release|Any CPU.Build.0 = Release|Any CPU
{135C1BF2-2097-60BD-377A-41A9F80EB060}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{135C1BF2-2097-60BD-377A-41A9F80EB060}.Debug|Any CPU.Build.0 = Debug|Any CPU
{135C1BF2-2097-60BD-377A-41A9F80EB060}.Release|Any CPU.ActiveCfg = Release|Any CPU
{135C1BF2-2097-60BD-377A-41A9F80EB060}.Release|Any CPU.Build.0 = Release|Any CPU
{81D2B2B1-0A9C-E81D-789A-A9C2C21FD03E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81D2B2B1-0A9C-E81D-789A-A9C2C21FD03E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81D2B2B1-0A9C-E81D-789A-A9C2C21FD03E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81D2B2B1-0A9C-E81D-789A-A9C2C21FD03E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -756,7 +762,6 @@ Global
{9F96589A-C7F8-4E33-BD6E-3BDA40205D07} = {EFB33E23-9E98-4B85-99E4-865705D5ACD2}
{E7FE662C-24E4-4915-9847-26AB4038540D} = {5126C261-9A81-4FBC-8653-7710C1D1D735}
{89C3B730-4024-4C76-8CB0-FAA8BF0945B9} = {5126C261-9A81-4FBC-8653-7710C1D1D735}
{E109E848-54D2-4BCE-808E-F5F3844A1B1D} = {59C3DFB0-C6E1-4F7E-AD9D-9857A4153A1E}
{09ABC5EB-0896-4693-A057-A03B35E0294C} = {D01CF5F0-67D0-44E3-B7CE-0BAD4F475C0E}
{5F141D56-D6ED-45C7-A355-63EC641246DB} = {F8C07F29-7233-4FD3-A3DC-45963071E20A}
{E1C1B35D-6336-413B-B7DE-25BC24AE401A} = {F8C07F29-7233-4FD3-A3DC-45963071E20A}
@@ -808,6 +813,8 @@ Global
{0B5E9F7A-54C9-4A27-964E-5A568E5D7626} = {DB89FCB6-E4F9-4BD4-93F3-4E857741D749}
{D470A6E0-597C-4A67-8CEF-BB7D9405626A} = {F8C07F29-7233-4FD3-A3DC-45963071E20A}
{3A76B68F-7C8B-4310-BE2F-434B714DE3F7} = {F8C07F29-7233-4FD3-A3DC-45963071E20A}
{135C1BF2-2097-60BD-377A-41A9F80EB060} = {59C3DFB0-C6E1-4F7E-AD9D-9857A4153A1E}
{81D2B2B1-0A9C-E81D-789A-A9C2C21FD03E} = {59C3DFB0-C6E1-4F7E-AD9D-9857A4153A1E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DB787235-A13A-4A3D-B5A8-5DFEB6511EEE}

View File

@@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.1" />
<PackageReference Include="TouchSocket.Hosting" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.NamedPipe" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Hosting" Version="3.0.14" />
<PackageReference Include="TouchSocket.NamedPipe" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Http" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Http" Version="3.0.14" />
</ItemGroup>
<!--<ItemGroup>

View File

@@ -21,7 +21,7 @@
</ItemGroup>-->
<ItemGroup>
<PackageReference Include="TouchSocket.Http" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Http" Version="3.0.14" />
</ItemGroup>
<ItemGroup>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Http" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Http" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -12,6 +12,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -10,6 +10,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Modbus" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Modbus" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocketPro.Modbus" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Modbus" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocketPro.Modbus" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Modbus" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.NamedPipe" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.NamedPipe" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.NamedPipe" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.NamedPipe" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,8 +8,8 @@
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
<PackageReference Include="TouchSocket.Hosting" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.NamedPipe" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Hosting" Version="3.0.14" />
<PackageReference Include="TouchSocket.NamedPipe" Version="3.0.14" />
</ItemGroup>
<!--<ItemGroup>

View File

@@ -6,12 +6,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc.RateLimiting" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc.RateLimiting" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.SerialPorts" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.SerialPorts" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Core.DependencyInjection" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.Core.DependencyInjection" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,12 +8,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -6,12 +6,12 @@
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.AspNetCore" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.AspNetCore" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,6 +8,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -18,7 +18,7 @@
</ItemGroup>-->
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -8,12 +8,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,11 +7,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket" Version="3.0.14" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.Rpc" Version="3.0.14" />
<PackageReference Include="TouchSocket.WebApi" Version="3.0.14" />
<PackageReference Include="TouchSocket.XmlRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -1,216 +0,0 @@
//------------------------------------------------------------------------------
// 此代码版权除特别声明或在XREF结尾的命名空间的代码归作者本人若汝棋茗所有
// 源代码使用协议遵循本仓库的开源协议及附加协议若本仓库没有设置则按MIT开源协议授权
// CSDN博客https://blog.csdn.net/qq_40374647
// 哔哩哔哩视频https://space.bilibili.com/94253567
// Gitee源代码仓库https://gitee.com/RRQM_Home
// Github源代码仓库https://github.com/RRQM
// API首页https://touchsocket.net/
// 交流QQ群234762506
// 感谢您的下载和使用
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.IO;
using System.Net.WebSockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TouchSocket.Core;
using TouchSocket.Dmtp;
using TouchSocket.Dmtp.Rpc;
using TouchSocket.JsonRpc;
using TouchSocket.Rpc;
using TouchSocket.Sockets;
namespace UnityServerConsoleApp
{
internal class Program
{
static UdpSession udpService = new UdpSession();
static HttpDmtpService httpDmtpService = new HttpDmtpService();
static TcpService tcpService = new TcpService();
private static async Task Main(string[] args)
{
//unitypackage在本级目录下。
await StartTcpService(7789);
await StartDmtpService(7790);
await StartUdpService(7791);
Console.ReadKey();
}
private static async Task StartUdpService(int port)
{
udpService.Received = async (c, e) =>
{
await udpService.SendAsync(e.EndPoint, e.ByteBlock.Memory);
Console.WriteLine($"收到:{e.ByteBlock.Span.ToString(Encoding.UTF8)}");
};
await udpService.SetupAsync(new TouchSocketConfig()
.SetBindIPHost(new IPHost(port))
.SetUdpDataHandlingAdapter(() => new NormalUdpDataHandlingAdapter())//常规udp
//.SetUdpDataHandlingAdapter(() => new UdpPackageAdapter())//Udp包模式支持超过64k数据。
.ConfigureContainer(a =>
{
a.AddConsoleLogger();//添加一个日志注入
}));
await udpService.StartAsync();
udpService.Logger.Info($"UdpService已启动端口{port}");
}
private static async Task StartDmtpService(int port)
{
var config = new TouchSocketConfig()//配置
.SetListenIPHosts(port)
.ConfigureContainer(a =>
{
a.AddConsoleLogger();//注册一个日志组
//注册rpc服务
a.AddRpcStore(store =>
{
store.RegisterServer<MyRpcServer>();
#if DEBUG
var code = store.GetProxyCodes("UnityRpcProxy", typeof(DmtpRpcAttribute), typeof(JsonRpcAttribute));
File.WriteAllText("../../../UnityRpcProxy.cs", code);
#endif
});
})
.ConfigurePlugins(a =>
{
//启用dmtp rpc插件
a.UseDmtpRpc();
//启用websocket插件
a.UseWebSocket()
.SetWSUrl("/ws");
//启用json rpc插件
a.UseWebSocketJsonRpc()
.SetAllowJsonRpc((websocket, context) => true);//让所有请求WebSocket都加载JsonRpc插件
a.Add<MyTcpRpcPlguin>();
})
.SetDmtpOption(new DmtpOption()
{
VerifyToken = "Dmtp"//设置验证token
});
await httpDmtpService.SetupAsync(config);
await httpDmtpService.StartAsync();
httpDmtpService.Logger.Info($"{httpDmtpService.GetType().Name}已启动,监听端口:{port}");
}
private static async Task StartTcpService(int port)
{
await tcpService.SetupAsync(new TouchSocketConfig()//载入配置
.SetListenIPHosts(new IPHost(port))
.SetTcpDataHandlingAdapter(() => new FixedHeaderPackageAdapter())
.ConfigurePlugins(a =>
{
a.Add<MyPlguin>();//此处可以添加插件
})
.ConfigureContainer(a =>
{
a.AddConsoleLogger();//添加一个日志注入
}));
await tcpService.StartAsync();//启动
tcpService.Logger.Info($"Tcp服务器已启动端口{port}");
}
}
internal class MyTcpRpcPlguin : PluginBase
{
}
internal class MyPlguin : PluginBase, ITcpConnectedPlugin, ITcpClosedPlugin, ITcpReceivedPlugin
{
public async Task OnTcpClosed(ITcpSession client, ClosedEventArgs e)
{
client.Logger.Info($"客户端{client.GetIPPort()}已断开");
await e.InvokeNext();
}
public async Task OnTcpConnected(ITcpSession client, ConnectedEventArgs e)
{
client.Logger.Info($"客户端{client.GetIPPort()}已连接");
await e.InvokeNext();
}
public async Task OnTcpReceived(ITcpSession client, ReceivedDataEventArgs e)
{
client.Logger.Info($"接收到信息:{e.ByteBlock.Span.ToString(Encoding.UTF8)}");
if (client is ITcpSessionClient sessionClient)
{
await sessionClient.SendAsync($"服务器已收到你发送的消息:{e.ByteBlock.ToString()}");
}
await e.InvokeNext();
}
}
public partial class MyRpcServer : RpcServer
{
public MyRpcServer(ILog logger)
{
this.m_timer = new Timer((obj) =>
{
logger.Info($"count={this.count}");
}, null, 0, 1000);
this.m_logger = logger;
}
private Timer m_timer;
private int count;
private readonly ILog m_logger;
[Description("登录")]
[DmtpRpc(MethodInvoke = true, MethodName = "DmtpRpc_{0}")]
[JsonRpc(MethodInvoke = true, MethodName = "JsonRpc_{0}")]
public MyLoginModelResult Login(ICallContext callContext, MyLoginModel model)
{
if (model.Account == "123" && model.Password == "abc")
{
return new MyLoginModelResult() { ResultCode = ResultCode.Success, Message = "Success" };
}
return new MyLoginModelResult() { ResultCode = ResultCode.Fail, Message = "账号或密码错误" };
}
[Description("性能测试")]
[DmtpRpc(MethodInvoke = true, MethodName = "DmtpRpc_{0}")]
[JsonRpc(MethodInvoke = true, MethodName = "JsonRpc_{0}")]
public int Performance(int i)
{
Interlocked.Increment(ref this.count);
return ++i;
}
}
public class MyLoginModel
{
public string Token { get; set; }
public string Account { get; set; }
public string Password { get; set; }
}
public class MyLoginModelResult
{
public ResultCode ResultCode { get; set; }
public string Message { get; set; }
}
}

View File

@@ -1,318 +0,0 @@
/*
此代码由Rpc工具直接生成非必要请不要修改此处代码
*/
#pragma warning disable
using System;
using TouchSocket.Core;
using TouchSocket.Sockets;
using TouchSocket.Rpc;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
namespace UnityRpcProxy
{
public interface IMyRpcServer:TouchSocket.Rpc.IRemoteServer
{
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
MyLoginModelResult DmtpRpc_Login(MyLoginModel model,IInvokeOption invokeOption = default);
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task<MyLoginModelResult> DmtpRpc_LoginAsync(MyLoginModel model,IInvokeOption invokeOption = default);
///<summary>
///性能测试
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
System.Int32 DmtpRpc_Performance(System.Int32 i,IInvokeOption invokeOption = default);
///<summary>
///性能测试
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task<System.Int32> DmtpRpc_PerformanceAsync(System.Int32 i,IInvokeOption invokeOption = default);
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
MyLoginModelResult JsonRpc_Login(MyLoginModel model,IInvokeOption invokeOption = default);
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task<MyLoginModelResult> JsonRpc_LoginAsync(MyLoginModel model,IInvokeOption invokeOption = default);
///<summary>
///性能测试
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
System.Int32 JsonRpc_Performance(System.Int32 i,IInvokeOption invokeOption = default);
///<summary>
///性能测试
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task<System.Int32> JsonRpc_PerformanceAsync(System.Int32 i,IInvokeOption invokeOption = default);
}
public class MyRpcServer :IMyRpcServer
{
public MyRpcServer(IRpcClient client)
{
this.Client=client;
}
public IRpcClient Client{get;private set; }
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public MyLoginModelResult DmtpRpc_Login(MyLoginModel model,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] @_parameters = new object[]{model};
MyLoginModelResult returnData=(MyLoginModelResult)this.Client.Invoke("DmtpRpc_Login",typeof(MyLoginModelResult),invokeOption, @_parameters);
return returnData;
}
///<summary>
///登录
///</summary>
public async Task<MyLoginModelResult> DmtpRpc_LoginAsync(MyLoginModel model,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] parameters = new object[]{model};
return (MyLoginModelResult) await this.Client.InvokeAsync("DmtpRpc_Login",typeof(MyLoginModelResult),invokeOption, parameters);
}
///<summary>
///性能测试
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public System.Int32 DmtpRpc_Performance(System.Int32 i,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] @_parameters = new object[]{i};
System.Int32 returnData=(System.Int32)this.Client.Invoke("DmtpRpc_Performance",typeof(System.Int32),invokeOption, @_parameters);
return returnData;
}
///<summary>
///性能测试
///</summary>
public async Task<System.Int32> DmtpRpc_PerformanceAsync(System.Int32 i,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] parameters = new object[]{i};
return (System.Int32) await this.Client.InvokeAsync("DmtpRpc_Performance",typeof(System.Int32),invokeOption, parameters);
}
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public MyLoginModelResult JsonRpc_Login(MyLoginModel model,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] @_parameters = new object[]{model};
MyLoginModelResult returnData=(MyLoginModelResult)this.Client.Invoke("JsonRpc_Login",typeof(MyLoginModelResult),invokeOption, @_parameters);
return returnData;
}
///<summary>
///登录
///</summary>
public async Task<MyLoginModelResult> JsonRpc_LoginAsync(MyLoginModel model,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] parameters = new object[]{model};
return (MyLoginModelResult) await this.Client.InvokeAsync("JsonRpc_Login",typeof(MyLoginModelResult),invokeOption, parameters);
}
///<summary>
///性能测试
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public System.Int32 JsonRpc_Performance(System.Int32 i,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] @_parameters = new object[]{i};
System.Int32 returnData=(System.Int32)this.Client.Invoke("JsonRpc_Performance",typeof(System.Int32),invokeOption, @_parameters);
return returnData;
}
///<summary>
///性能测试
///</summary>
public async Task<System.Int32> JsonRpc_PerformanceAsync(System.Int32 i,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] parameters = new object[]{i};
return (System.Int32) await this.Client.InvokeAsync("JsonRpc_Performance",typeof(System.Int32),invokeOption, parameters);
}
}
public static class MyRpcServerExtensions
{
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static MyLoginModelResult DmtpRpc_Login<TClient>(this TClient client,MyLoginModel model,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Dmtp.Rpc.IDmtpRpcActor{
object[] @_parameters = new object[]{model};
MyLoginModelResult returnData=(MyLoginModelResult)client.Invoke("DmtpRpc_Login",typeof(MyLoginModelResult),invokeOption, @_parameters);
return returnData;
}
///<summary>
///登录
///</summary>
public static async Task<MyLoginModelResult> DmtpRpc_LoginAsync<TClient>(this TClient client,MyLoginModel model,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Dmtp.Rpc.IDmtpRpcActor{
object[] parameters = new object[]{model};
return (MyLoginModelResult) await client.InvokeAsync("DmtpRpc_Login",typeof(MyLoginModelResult),invokeOption, parameters);
}
///<summary>
///性能测试
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static System.Int32 DmtpRpc_Performance<TClient>(this TClient client,System.Int32 i,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Dmtp.Rpc.IDmtpRpcActor{
object[] @_parameters = new object[]{i};
System.Int32 returnData=(System.Int32)client.Invoke("DmtpRpc_Performance",typeof(System.Int32),invokeOption, @_parameters);
return returnData;
}
///<summary>
///性能测试
///</summary>
public static async Task<System.Int32> DmtpRpc_PerformanceAsync<TClient>(this TClient client,System.Int32 i,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Dmtp.Rpc.IDmtpRpcActor{
object[] parameters = new object[]{i};
return (System.Int32) await client.InvokeAsync("DmtpRpc_Performance",typeof(System.Int32),invokeOption, parameters);
}
///<summary>
///登录
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static MyLoginModelResult JsonRpc_Login<TClient>(this TClient client,MyLoginModel model,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] @_parameters = new object[]{model};
MyLoginModelResult returnData=(MyLoginModelResult)client.Invoke("JsonRpc_Login",typeof(MyLoginModelResult),invokeOption, @_parameters);
return returnData;
}
///<summary>
///登录
///</summary>
public static async Task<MyLoginModelResult> JsonRpc_LoginAsync<TClient>(this TClient client,MyLoginModel model,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] parameters = new object[]{model};
return (MyLoginModelResult) await client.InvokeAsync("JsonRpc_Login",typeof(MyLoginModelResult),invokeOption, parameters);
}
///<summary>
///性能测试
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static System.Int32 JsonRpc_Performance<TClient>(this TClient client,System.Int32 i,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] @_parameters = new object[]{i};
System.Int32 returnData=(System.Int32)client.Invoke("JsonRpc_Performance",typeof(System.Int32),invokeOption, @_parameters);
return returnData;
}
///<summary>
///性能测试
///</summary>
public static async Task<System.Int32> JsonRpc_PerformanceAsync<TClient>(this TClient client,System.Int32 i,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] parameters = new object[]{i};
return (System.Int32) await client.InvokeAsync("JsonRpc_Performance",typeof(System.Int32),invokeOption, parameters);
}
}
public class MyLoginModelResult
{
public TouchSocket.Core.ResultCode ResultCode { get; set; }
public System.String Message { get; set; }
}
public class MyLoginModel
{
public System.String Token { get; set; }
public System.String Account { get; set; }
public System.String Password { get; set; }
}
}

View File

@@ -1,11 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.Dmtp" Version="3.0.14-build.1" />
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14-build.1" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,18 @@
using UnityServerConsoleApp_2D.TouchServer;
namespace UnityServerConsoleApp_2D
{
internal class Program
{
//适用于unity的package包在同级目录中
static async Task Main(string[] args)
{
Touch_JsonWebSocket_2D touch_2d = new Touch_JsonWebSocket_2D();
await touch_2d.StartService(7794);
Console.ReadKey();
}
}
}

View File

@@ -0,0 +1,297 @@
/*
此代码由Rpc工具直接生成非必要请不要修改此处代码
*/
#pragma warning disable
using System;
using TouchSocket.Core;
using TouchSocket.Sockets;
using TouchSocket.Rpc;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
namespace UnityRpcProxy
{
public interface IReverse2DSquareRpcServer:TouchSocket.Rpc.IRemoteServer
{
///<summary>
///更新位置
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
void UpdatePosition(System.Int32 id,System.Numerics.Vector3 vector3,System.Int64 time,IInvokeOption invokeOption = default);
///<summary>
///更新位置
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task UpdatePositionAsync(System.Int32 id,System.Numerics.Vector3 vector3,System.Int64 time,IInvokeOption invokeOption = default);
///<summary>
///创建新的NPC
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
void NewNPC(System.Int32 id,System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default);
///<summary>
///创建新的NPC
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task NewNPCAsync(System.Int32 id,System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default);
///<summary>
///玩家离线
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
void Offline(System.Int32 id,IInvokeOption invokeOption = default);
///<summary>
///玩家离线
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task OfflineAsync(System.Int32 id,IInvokeOption invokeOption = default);
///<summary>
///玩家登陆
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
void PlayerLogin(System.Int32 id,IInvokeOption invokeOption = default);
///<summary>
///玩家登陆
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task PlayerLoginAsync(System.Int32 id,IInvokeOption invokeOption = default);
}
public class Reverse2DSquareRpcServer :IReverse2DSquareRpcServer
{
public Reverse2DSquareRpcServer(IRpcClient client)
{
this.Client=client;
}
public IRpcClient Client{get;private set; }
///<summary>
///更新位置
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public void UpdatePosition(System.Int32 id,System.Numerics.Vector3 vector3,System.Int64 time,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] @_parameters = new object[]{id,vector3,time};
this.Client.Invoke("UpdatePosition",null,invokeOption, @_parameters);
}
///<summary>
///更新位置
///</summary>
public Task UpdatePositionAsync(System.Int32 id,System.Numerics.Vector3 vector3,System.Int64 time,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] parameters = new object[]{id,vector3,time};
return this.Client.InvokeAsync("UpdatePosition",null,invokeOption, parameters);
}
///<summary>
///创建新的NPC
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public void NewNPC(System.Int32 id,System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] @_parameters = new object[]{id,vector3};
this.Client.Invoke("NewNPC",null,invokeOption, @_parameters);
}
///<summary>
///创建新的NPC
///</summary>
public Task NewNPCAsync(System.Int32 id,System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] parameters = new object[]{id,vector3};
return this.Client.InvokeAsync("NewNPC",null,invokeOption, parameters);
}
///<summary>
///玩家离线
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public void Offline(System.Int32 id,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] @_parameters = new object[]{id};
this.Client.Invoke("Offline",null,invokeOption, @_parameters);
}
///<summary>
///玩家离线
///</summary>
public Task OfflineAsync(System.Int32 id,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] parameters = new object[]{id};
return this.Client.InvokeAsync("Offline",null,invokeOption, parameters);
}
///<summary>
///玩家登陆
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public void PlayerLogin(System.Int32 id,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] @_parameters = new object[]{id};
this.Client.Invoke("PlayerLogin",null,invokeOption, @_parameters);
}
///<summary>
///玩家登陆
///</summary>
public Task PlayerLoginAsync(System.Int32 id,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] parameters = new object[]{id};
return this.Client.InvokeAsync("PlayerLogin",null,invokeOption, parameters);
}
}
public static class Reverse2DSquareRpcServerExtensions
{
///<summary>
///更新位置
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static void UpdatePosition<TClient>(this TClient client,System.Int32 id,System.Numerics.Vector3 vector3,System.Int64 time,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] @_parameters = new object[]{id,vector3,time};
client.Invoke("UpdatePosition",null,invokeOption, @_parameters);
}
///<summary>
///更新位置
///</summary>
public static Task UpdatePositionAsync<TClient>(this TClient client,System.Int32 id,System.Numerics.Vector3 vector3,System.Int64 time,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] parameters = new object[]{id,vector3,time};
return client.InvokeAsync("UpdatePosition",null,invokeOption, parameters);
}
///<summary>
///创建新的NPC
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static void NewNPC<TClient>(this TClient client,System.Int32 id,System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] @_parameters = new object[]{id,vector3};
client.Invoke("NewNPC",null,invokeOption, @_parameters);
}
///<summary>
///创建新的NPC
///</summary>
public static Task NewNPCAsync<TClient>(this TClient client,System.Int32 id,System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] parameters = new object[]{id,vector3};
return client.InvokeAsync("NewNPC",null,invokeOption, parameters);
}
///<summary>
///玩家离线
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static void Offline<TClient>(this TClient client,System.Int32 id,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] @_parameters = new object[]{id};
client.Invoke("Offline",null,invokeOption, @_parameters);
}
///<summary>
///玩家离线
///</summary>
public static Task OfflineAsync<TClient>(this TClient client,System.Int32 id,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] parameters = new object[]{id};
return client.InvokeAsync("Offline",null,invokeOption, parameters);
}
///<summary>
///玩家登陆
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static void PlayerLogin<TClient>(this TClient client,System.Int32 id,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] @_parameters = new object[]{id};
client.Invoke("PlayerLogin",null,invokeOption, @_parameters);
}
///<summary>
///玩家登陆
///</summary>
public static Task PlayerLoginAsync<TClient>(this TClient client,System.Int32 id,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] parameters = new object[]{id};
return client.InvokeAsync("PlayerLogin",null,invokeOption, parameters);
}
}
}

View File

@@ -0,0 +1,96 @@
/*
此代码由Rpc工具直接生成非必要请不要修改此处代码
*/
#pragma warning disable
using System;
using TouchSocket.Core;
using TouchSocket.Sockets;
using TouchSocket.Rpc;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
namespace UnityRpcProxy_Json_HttpDmtp_2D
{
public interface IUnityRpcStore:TouchSocket.Rpc.IRemoteServer
{
///<summary>
///单位移动
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
void JsonRpc_UnitMovement(System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default);
///<summary>
///单位移动
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task JsonRpc_UnitMovementAsync(System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default);
}
public class UnityRpcStore :IUnityRpcStore
{
public UnityRpcStore(IRpcClient client)
{
this.Client=client;
}
public IRpcClient Client{get;private set; }
///<summary>
///单位移动
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public void JsonRpc_UnitMovement(System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] @_parameters = new object[]{vector3};
this.Client.Invoke("JsonRpc_UnitMovement",null,invokeOption, @_parameters);
}
///<summary>
///单位移动
///</summary>
public Task JsonRpc_UnitMovementAsync(System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] parameters = new object[]{vector3};
return this.Client.InvokeAsync("JsonRpc_UnitMovement",null,invokeOption, parameters);
}
}
public static class UnityRpcStoreExtensions
{
///<summary>
///单位移动
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static void JsonRpc_UnitMovement<TClient>(this TClient client,System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] @_parameters = new object[]{vector3};
client.Invoke("JsonRpc_UnitMovement",null,invokeOption, @_parameters);
}
///<summary>
///单位移动
///</summary>
public static Task JsonRpc_UnitMovementAsync<TClient>(this TClient client,System.Numerics.Vector3 vector3,IInvokeOption invokeOption = default) where TClient:
TouchSocket.JsonRpc.IJsonRpcClient{
object[] parameters = new object[]{vector3};
return client.InvokeAsync("JsonRpc_UnitMovement",null,invokeOption, parameters);
}
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UnityServerConsoleApp_2D.TouchServer
{
/// <summary>
/// 基础网络服务接口
/// </summary>
public interface BaseTouchServer
{
/// <summary>
/// 启动服务
/// </summary>
/// <param name="port"></param>
Task StartService(int port);
}
}

View File

@@ -0,0 +1,147 @@
using System.Numerics;
using TouchSocket.Core;
using TouchSocket.Dmtp;
using TouchSocket.Dmtp.Rpc;
using TouchSocket.Http;
using TouchSocket.Http.WebSockets;
using TouchSocket.JsonRpc;
using TouchSocket.Rpc;
using TouchSocket.Sockets;
using UnityRpcProxy;
namespace UnityServerConsoleApp_2D.TouchServer
{
/// <summary>
/// Web Socket
/// </summary>
public class Touch_JsonWebSocket_2D : BaseTouchServer
{
JsonHttpService dmtpService = new JsonHttpService();
public async Task StartService(int port)
{
var config = new TouchSocketConfig()//配置
.SetListenIPHosts(port)
.ConfigureContainer(a =>
{
a.AddConsoleLogger();//注册一个日志组
//注册rpc服务
a.AddRpcStore(store =>
{
store.RegisterServer<UnityRpcStore>();
#if DEBUG
var code = store.GetProxyCodes("UnityRpcProxy_Json_HttpDmtp_2D", typeof(JsonRpcAttribute));
File.WriteAllText("../../../RPCStore/UnityRpcProxy_Json_HttpDmtp_2D.cs", code);
#endif
});
})
.ConfigurePlugins(a =>
{
a.UseWebSocket()
.SetWSUrl("/ws");
//启用json rpc插件
a.UseWebSocketJsonRpc()
.SetAllowJsonRpc((websocket, context) => true);//让所有请求WebSocket都加载JsonRpc插件
a.Add<Touch_JsonWebSocket_Log_Plguin>();
});
await dmtpService.SetupAsync(config);
await dmtpService.StartAsync();
dmtpService.Logger.Info($"TCP_JsonWebSocket已启动监听端口{port}");
}
}
/// <summary>
/// 状态日志打印插件
/// </summary>
internal class Touch_JsonWebSocket_Log_Plguin : PluginBase, IWebSocketHandshakedPlugin, IWebSocketClosedPlugin
{
ILog Log;
public Touch_JsonWebSocket_Log_Plguin(ILog Log)
{
this.Log = Log;
}
static int ID;
public async Task OnWebSocketClosed(IWebSocket webSocket, ClosedEventArgs e)
{
webSocket.Client.Logger.Info($"TCP_WebSocket:客户端{webSocket.Client.IP}已断开");
if (webSocket.Client is JsonHttpSessionClient client) {
Log.Info("在线用户" + client.Service.Count);
foreach (JsonHttpSessionClient clientItem in client.Service.GetClients())
{
//对已经在线的客户端通知他们有玩家退出
if (clientItem != client)
{
_ = clientItem.GetJsonRpcActionClient().OfflineAsync(client.ID);
}
}
}
await e.InvokeNext();
}
public async Task OnWebSocketHandshaked(IWebSocket webSocket, HttpContextEventArgs e)
{
if (webSocket.Client is JsonHttpSessionClient client)
{
Log.Info($"TCP_WebSocket:客户端{webSocket.Client.IP}已连接");
client.ID = ++ID;
_ = Task.Run(async () =>
{
foreach (JsonHttpSessionClient clientItem in client.Service.GetClients())
{
//对当前玩家返回已登陆玩家的数据
await client.GetJsonRpcActionClient().NewNPCAsync(clientItem.ID, clientItem.Postion);
}
foreach (JsonHttpSessionClient clientItem in client.Service.GetClients())
{
//对已在线的玩家添加在线用户
await clientItem.GetJsonRpcActionClient().NewNPCAsync(client.ID, client.Postion);
}
await client.GetJsonRpcActionClient().PlayerLoginAsync(client.ID);
});
Log.Info("在线用户"+ client.Service.Count);
}
await e.InvokeNext();
}
}
/// <summary>
/// 自定义HttpDmtpService
/// </summary>
internal class JsonHttpService : HttpDmtpService<JsonHttpSessionClient>
{
protected override JsonHttpSessionClient NewClient()
{
return new JsonHttpSessionClient();
}
}
/// <summary>
/// 自定义HttpDmtpSessionClient
/// </summary>
internal class JsonHttpSessionClient : HttpDmtpSessionClient
{
public int ID { get; set; }
/// <summary>
/// 位置
/// </summary>
public Vector3 Postion { get; set; }
public JsonHttpSessionClient() {
}
}
}

View File

@@ -0,0 +1,55 @@
using System.ComponentModel;
using TouchSocket.Core;
using TouchSocket.JsonRpc;
using TouchSocket.Rpc;
using System.Numerics;
using UnityRpcProxy;
namespace UnityServerConsoleApp_2D.TouchServer
{
internal class UnityRpcStore: RpcServer
{
private readonly ILog m_logger;
public UnityRpcStore(ILog logger)
{
this.m_logger = logger;
}
/// <summary>
/// 将 DateTime 转换为时间戳(毫秒)
/// </summary>
/// <param name="dateTime">要转换的 DateTime</param>
/// <returns>时间戳(毫秒)</returns>
public static long ToTimestamp(DateTime dateTime)
{
// Unix 纪元时间
DateTime unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
// 计算时间差并转换为毫秒
TimeSpan timeSpan = dateTime.ToUniversalTime() - unixEpoch;
return (long)timeSpan.TotalMilliseconds;
}
[Description("单位移动")]
[JsonRpc(MethodInvoke = true, MethodName = "JsonRpc_{0}")]
public void UnitMovement(ICallContext callContext,Vector3 vector3)
{
if (callContext.Caller is JsonHttpSessionClient jsonsession)
{
jsonsession.Postion = vector3;
foreach (JsonHttpSessionClient clientItem in jsonsession.Service.GetClients())
{
//通知除开玩家的其他所有客户端
if (jsonsession!=clientItem)
{
clientItem.GetJsonRpcActionClient().UpdatePositionAsync(jsonsession.ID, jsonsession.Postion, ToTimestamp(DateTime.Now));
}
}
}
}
}
}

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TouchSocket.JsonRpc" Version="3.0.14" />
<PackageReference Include="TouchSocketPro.Dmtp" Version="3.0.14" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,26 @@
using UnityServerConsoleApp_All.TouchServer;
namespace UnityServerConsoleApp_All
{
internal class Program
{
//适用于unity的package包在同级目录中
static async Task Main(string[] args)
{
Touch_UDP touch_UDP = new Touch_UDP();
Touch_TCP touch_TCP = new Touch_TCP();
Touch_HttpDmtp touch_Dmtp = new Touch_HttpDmtp();
Touch_WebSocket touch_WebSocket = new Touch_WebSocket();
Touch_JsonWebSocket touch_JsonWeb = new Touch_JsonWebSocket();
await touch_TCP.StartService(7789);
await touch_Dmtp.StartService(7790);
await touch_UDP.StartService(7791);
await touch_WebSocket.StartService(7792);
await touch_JsonWeb.StartService(7793);
Console.ReadKey();
}
}
}

View File

@@ -0,0 +1,98 @@
/*
此代码由Rpc工具直接生成非必要请不要修改此处代码
*/
#pragma warning disable
using System;
using TouchSocket.Core;
using TouchSocket.Sockets;
using TouchSocket.Rpc;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
namespace UnityRpcProxy
{
public interface ITouch_HttpDmtp_Client_UnityRpcStore:TouchSocket.Rpc.IRemoteServer
{
///<summary>
///无注释信息
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
System.Int32 RandomNumber(System.Int32 a,System.Int32 b,IInvokeOption invokeOption = default);
///<summary>
///无注释信息
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
Task<System.Int32> RandomNumberAsync(System.Int32 a,System.Int32 b,IInvokeOption invokeOption = default);
}
public class Touch_HttpDmtp_Client_UnityRpcStore :ITouch_HttpDmtp_Client_UnityRpcStore
{
public Touch_HttpDmtp_Client_UnityRpcStore(IRpcClient client)
{
this.Client=client;
}
public IRpcClient Client{get;private set; }
///<summary>
///无注释信息
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public System.Int32 RandomNumber(System.Int32 a,System.Int32 b,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] @_parameters = new object[]{a,b};
System.Int32 returnData=(System.Int32)this.Client.Invoke("RandomNumber",typeof(System.Int32),invokeOption, @_parameters);
return returnData;
}
///<summary>
///无注释信息
///</summary>
public async Task<System.Int32> RandomNumberAsync(System.Int32 a,System.Int32 b,IInvokeOption invokeOption = default)
{
if(this.Client==null)
{
throw new RpcException("IRpcClient为空请先初始化或者进行赋值");
}
object[] parameters = new object[]{a,b};
return (System.Int32) await this.Client.InvokeAsync("RandomNumber",typeof(System.Int32),invokeOption, parameters);
}
}
public static class Touch_HttpDmtp_Client_UnityRpcStoreExtensions
{
///<summary>
///无注释信息
///</summary>
/// <exception cref="System.TimeoutException">调用超时</exception>
/// <exception cref="TouchSocket.Rpc.RpcInvokeException">Rpc调用异常</exception>
/// <exception cref="System.Exception">其他异常</exception>
public static System.Int32 RandomNumber<TClient>(this TClient client,System.Int32 a,System.Int32 b,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Dmtp.Rpc.IDmtpRpcActor{
object[] @_parameters = new object[]{a,b};
System.Int32 returnData=(System.Int32)client.Invoke("RandomNumber",typeof(System.Int32),invokeOption, @_parameters);
return returnData;
}
///<summary>
///无注释信息
///</summary>
public static async Task<System.Int32> RandomNumberAsync<TClient>(this TClient client,System.Int32 a,System.Int32 b,IInvokeOption invokeOption = default) where TClient:
TouchSocket.Dmtp.Rpc.IDmtpRpcActor{
object[] parameters = new object[]{a,b};
return (System.Int32) await client.InvokeAsync("RandomNumber",typeof(System.Int32),invokeOption, parameters);
}
}
}

Some files were not shown because too many files have changed in this diff Show More