Updated
This commit is contained in:
BIN
NotificationServer/NotificationServer/NotificationClient.dll
Normal file
BIN
NotificationServer/NotificationServer/NotificationClient.dll
Normal file
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="EonaCat.Helpers">
|
||||
<HintPath>..\..\..\EonaCatHelpers\EonaCat.Helpers\bin\Release\net5.0\EonaCat.Helpers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NotificationClient">
|
||||
<HintPath>NotificationClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NotificationShared">
|
||||
<HintPath>NotificationShared.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
25
NotificationServer/NotificationServer/NotificationServer.sln
Normal file
25
NotificationServer/NotificationServer/NotificationServer.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.32014.148
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotificationServer", "NotificationServer.csproj", "{A46BB58A-7823-4ED7-ABEA-852807D46B3B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A46BB58A-7823-4ED7-ABEA-852807D46B3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A46BB58A-7823-4ED7-ABEA-852807D46B3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A46BB58A-7823-4ED7-ABEA-852807D46B3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A46BB58A-7823-4ED7-ABEA-852807D46B3B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {56457D21-FB6E-49F9-A912-41A10DDD278A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
BIN
NotificationServer/NotificationServer/NotificationShared.dll
Normal file
BIN
NotificationServer/NotificationServer/NotificationShared.dll
Normal file
Binary file not shown.
29
NotificationServer/NotificationServer/Program.cs
Normal file
29
NotificationServer/NotificationServer/Program.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using NotificationClient;
|
||||
using NotificationShared;
|
||||
|
||||
namespace EonaCat.Helpers.EonaCat.Notifications
|
||||
{
|
||||
class ConnectionSettings : IConnectionSettings
|
||||
{
|
||||
public string Address { get => "127.0.0.1"; set => throw new NotImplementedException(); }
|
||||
public int Port { get => 8888; set => throw new NotImplementedException(); }
|
||||
public Protocol Protocol { get => Protocol.UDP; set => throw new NotImplementedException(); }
|
||||
public int MaxConnections { get => 10000; set => throw new NotImplementedException(); }
|
||||
}
|
||||
public class test
|
||||
{
|
||||
|
||||
static async Task Main(string[] args)
|
||||
{
|
||||
NotificationServiceClient client = new NotificationServiceClient(new ConnectionSettings());
|
||||
client.OpenConnectionAsync(received);
|
||||
Console.WriteLine("Press any key to continue...");
|
||||
Console.ReadKey(true);
|
||||
}
|
||||
|
||||
private static void received(NotificationPayload obj)
|
||||
{
|
||||
Console.WriteLine(obj.Message);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user