wip
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<targets>
|
||||
<target name="logfile" xsi:type="File" fileName="logs/server-log-${shortdate}.log" layout="[${longdate}][${logger}][${level}] ${message} ${exception:format=ToString}" />
|
||||
<target name="logconsole" xsi:type="Console" layout="[${date}][${logger}][${level}] ${message} ${exception:format=ToString}"/>
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<logger name="*" minlevel="Trace" writeTo="logconsole" />
|
||||
<logger name="*" minlevel="Trace" writeTo="logfile" />
|
||||
</rules>
|
||||
</nlog>
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using NLog;
|
||||
using Ragon.Core;
|
||||
|
||||
namespace Ragon.Relay
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct Serializer
|
||||
{
|
||||
[FieldOffset(0)] public Guid Uuid;
|
||||
[FieldOffset(0)] public long Long0;
|
||||
[FieldOffset(0)] public long Long1;
|
||||
}
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var logger = LogManager.GetLogger("Ragon.Relay");
|
||||
logger.Info("Relay Application");
|
||||
var configuration = Configuration.Load("config.json");
|
||||
var relay = new Application(configuration);
|
||||
relay.Start();
|
||||
logger.Info("Started");
|
||||
Console.ReadKey();
|
||||
relay.Stop();
|
||||
logger.Info("Stopped");
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>Game</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="NLog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="config.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ragon.Core\Ragon.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"key": "defaultkey",
|
||||
"socket": "enet",
|
||||
"protocol": "1.0.0",
|
||||
"sendRate": 50,
|
||||
"port": 4444,
|
||||
"skipTimeout": 60,
|
||||
"reconnectTimeout": 300,
|
||||
"limitConnections": 4095,
|
||||
"limitPlayersPerRoom": 20,
|
||||
"limitRooms": 200
|
||||
}
|
||||
Reference in New Issue
Block a user