diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..8df737a2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,421 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- Backup*.rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+
+
+## VS CODE
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
\ No newline at end of file
diff --git a/.idea/.idea.server-csharp/.idea/.gitignore b/.idea/.idea.server-csharp/.idea/.gitignore
new file mode 100644
index 00000000..be6be836
--- /dev/null
+++ b/.idea/.idea.server-csharp/.idea/.gitignore
@@ -0,0 +1,13 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Rider ignored files
+/.idea.server-csharp.iml
+/modules.xml
+/projectSettingsUpdater.xml
+/contentModel.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/.idea.server-csharp/.idea/encodings.xml b/.idea/.idea.server-csharp/.idea/encodings.xml
new file mode 100644
index 00000000..df87cf95
--- /dev/null
+++ b/.idea/.idea.server-csharp/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.server-csharp/.idea/indexLayout.xml b/.idea/.idea.server-csharp/.idea/indexLayout.xml
new file mode 100644
index 00000000..7b08163c
--- /dev/null
+++ b/.idea/.idea.server-csharp/.idea/indexLayout.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.server-csharp/.idea/vcs.xml b/.idea/.idea.server-csharp/.idea/vcs.xml
new file mode 100644
index 00000000..35eb1ddf
--- /dev/null
+++ b/.idea/.idea.server-csharp/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Core/Annotations/Injectable.cs b/Core/Annotations/Injectable.cs
new file mode 100644
index 00000000..667d0fb2
--- /dev/null
+++ b/Core/Annotations/Injectable.cs
@@ -0,0 +1,15 @@
+namespace Types.Annotations;
+
+[AttributeUsage(AttributeTargets.Class)]
+public class Injectable(InjectionType injectionType = InjectionType.Scoped, Type? type = null) : Attribute
+{
+ public InjectionType InjectionType { get; set; } = injectionType;
+ public Type? InjectableTypeOverride { get; set; } = type;
+}
+
+public enum InjectionType
+{
+ Singleton,
+ Transient,
+ Scoped
+}
\ No newline at end of file
diff --git a/Core/Context/ContextVariable.cs b/Core/Context/ContextVariable.cs
new file mode 100644
index 00000000..7bea953c
--- /dev/null
+++ b/Core/Context/ContextVariable.cs
@@ -0,0 +1,8 @@
+namespace Types.Context;
+
+public class ContextVariable(object value, ContextVariableType contextVariableType)
+{
+ public object Value { get; } = value;
+ public DateTime Timestamp { get; } = DateTime.Now;
+ public ContextVariableType Type { get; } = contextVariableType;
+}
\ No newline at end of file
diff --git a/Core/Context/ContextVariableType.cs b/Core/Context/ContextVariableType.cs
new file mode 100644
index 00000000..0f64ca1b
--- /dev/null
+++ b/Core/Context/ContextVariableType.cs
@@ -0,0 +1,16 @@
+namespace Types.Context;
+
+public enum ContextVariableType
+{
+ /** Logged in users session id */
+ SESSION_ID = 0,
+ /** Currently acive raid information */
+ RAID_CONFIGURATION = 1,
+ /** SessionID + Timestamp when client first connected, has _ between values */
+ CLIENT_START_TIMESTAMP = 2,
+ /** When player is loading into map and loot is requested */
+ REGISTER_PLAYER_REQUEST = 3,
+ RAID_ADJUSTMENTS = 4,
+ /** Data returned from client request object from endLocalRaid() */
+ TRANSIT_INFO = 5,
+}
\ No newline at end of file
diff --git a/Core/Context/IApplicationContext.cs b/Core/Context/IApplicationContext.cs
new file mode 100644
index 00000000..4d6adbcc
--- /dev/null
+++ b/Core/Context/IApplicationContext.cs
@@ -0,0 +1,9 @@
+namespace Types.Context;
+
+public interface IApplicationContext
+{
+ ContextVariable? GetLatestValue(ContextVariableType type);
+ ICollection GetValues(ContextVariableType type);
+ void AddValue(ContextVariableType type, object value);
+ void ClearValues(ContextVariableType type);
+}
\ No newline at end of file
diff --git a/Core/Core.csproj b/Core/Core.csproj
new file mode 100644
index 00000000..0410f642
--- /dev/null
+++ b/Core/Core.csproj
@@ -0,0 +1,15 @@
+
+
+
+ net9.0
+ enable
+ enable
+ Library
+ Types
+
+
+
+
+
+
+
diff --git a/Core/Models/Config/HttpConfig.cs b/Core/Models/Config/HttpConfig.cs
new file mode 100644
index 00000000..2bfc67f7
--- /dev/null
+++ b/Core/Models/Config/HttpConfig.cs
@@ -0,0 +1,7 @@
+namespace Types.Models.Config;
+
+public class HttpConfig
+{
+ public int Port { get; set; }
+ public string Ip { get; set; }
+}
\ No newline at end of file
diff --git a/Core/Models/Enums/ConfigTypes.cs b/Core/Models/Enums/ConfigTypes.cs
new file mode 100644
index 00000000..822e6f27
--- /dev/null
+++ b/Core/Models/Enums/ConfigTypes.cs
@@ -0,0 +1,6 @@
+namespace Types.Models.Enums;
+
+public enum ConfigTypes
+{
+
+}
\ No newline at end of file
diff --git a/Core/Models/Utils/ILogger.cs b/Core/Models/Utils/ILogger.cs
new file mode 100644
index 00000000..bb146595
--- /dev/null
+++ b/Core/Models/Utils/ILogger.cs
@@ -0,0 +1,5 @@
+namespace Types.Models.Utils;
+
+public interface ILogger
+{
+}
\ No newline at end of file
diff --git a/Core/Servers/IConfigServer.cs b/Core/Servers/IConfigServer.cs
new file mode 100644
index 00000000..ce0157a9
--- /dev/null
+++ b/Core/Servers/IConfigServer.cs
@@ -0,0 +1,5 @@
+namespace Types.Servers;
+
+public interface IConfigServer
+{
+}
\ No newline at end of file
diff --git a/Core/Servers/IHttpServer.cs b/Core/Servers/IHttpServer.cs
new file mode 100644
index 00000000..4580c506
--- /dev/null
+++ b/Core/Servers/IHttpServer.cs
@@ -0,0 +1,7 @@
+namespace Types.Servers;
+
+public interface IHttpServer
+{
+ public void Load(WebApplicationBuilder builder);
+ public bool IsStarted();
+}
\ No newline at end of file
diff --git a/Core/Servers/IWebSocketServer.cs b/Core/Servers/IWebSocketServer.cs
new file mode 100644
index 00000000..c6dbb9f2
--- /dev/null
+++ b/Core/Servers/IWebSocketServer.cs
@@ -0,0 +1,5 @@
+namespace Types.Servers;
+
+public interface IWebSocketServer
+{
+}
\ No newline at end of file
diff --git a/Core/Services/ILocalisationService.cs b/Core/Services/ILocalisationService.cs
new file mode 100644
index 00000000..7ecd727d
--- /dev/null
+++ b/Core/Services/ILocalisationService.cs
@@ -0,0 +1,5 @@
+namespace Types.Services;
+
+public interface ILocalisationService
+{
+}
\ No newline at end of file
diff --git a/README b/README
new file mode 100644
index 00000000..e69de29b
diff --git a/Server/Context/ApplicationContext.cs b/Server/Context/ApplicationContext.cs
new file mode 100644
index 00000000..44993398
--- /dev/null
+++ b/Server/Context/ApplicationContext.cs
@@ -0,0 +1,63 @@
+using Types.Annotations;
+using Types.Context;
+
+namespace Server.Context;
+
+[Injectable(InjectionType.Singleton)]
+public class ApplicationContext : IApplicationContext
+{
+ private const short MaxSavedValues = 10;
+ private Dictionary> variables = new();
+ private object variablesLock = new();
+
+
+ public ContextVariable? GetLatestValue(ContextVariableType type)
+ {
+ lock (variablesLock)
+ {
+ if (variables.TryGetValue(type, out var savedValues))
+ return savedValues.Last!.Value;
+ }
+
+ return null;
+ }
+
+ public ICollection GetValues(ContextVariableType type)
+ {
+ lock (variablesLock)
+ {
+ var values = new List();
+ if (variables.TryGetValue(type, out var savedValues))
+ {
+ values.AddRange(savedValues);
+ }
+
+ return values;
+ }
+ }
+
+ public void AddValue(ContextVariableType type, object value)
+ {
+ lock (variablesLock)
+ {
+ if (!variables.TryGetValue(type, out var savedValues))
+ {
+ savedValues = [];
+ variables.Add(type, savedValues);
+ }
+
+ if (savedValues.Count >= MaxSavedValues)
+ savedValues.RemoveFirst();
+
+ savedValues.AddLast(new ContextVariable(value, type));
+ }
+ }
+
+ public void ClearValues(ContextVariableType type)
+ {
+ lock (variablesLock)
+ {
+ variables.Remove(type);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Server/Program.cs b/Server/Program.cs
new file mode 100644
index 00000000..28547712
--- /dev/null
+++ b/Server/Program.cs
@@ -0,0 +1,61 @@
+using Types.Annotations;
+using Types.Servers;
+
+namespace Server;
+
+public static class Program
+{
+ public static void Main(string[] args)
+ {
+ var builder = WebApplication.CreateBuilder(args);
+
+ RegisterSptComponents(builder.Services);
+
+ // TODO: deal with modding overriding services here!
+
+ var httpServer = builder.Services.BuildServiceProvider().GetService();
+ httpServer.Load(builder);
+ }
+
+ private static void RegisterComponents(IServiceCollection builderServices, IEnumerable types)
+ {
+ // We get all injectable services to register them on our services
+ foreach (var injectableType in types)
+ {
+ var attribute = (Injectable) Attribute.GetCustomAttribute(injectableType, typeof(Injectable))!;
+ var registerableType = injectableType;
+ // if we have a type override this takes priority
+ if (attribute.InjectableTypeOverride != null)
+ {
+ registerableType = attribute.InjectableTypeOverride;
+ }
+ // if this class only has 1 interface we register it on that interface
+ else if (registerableType.GetInterfaces().Length == 1)
+ {
+ registerableType = registerableType.GetInterfaces()[0];
+ }
+
+ switch (attribute.InjectionType)
+ {
+ case InjectionType.Singleton:
+ builderServices.AddSingleton(registerableType, injectableType);
+ break;
+ case InjectionType.Transient:
+ builderServices.AddTransient(registerableType, injectableType);
+ break;
+ case InjectionType.Scoped:
+ builderServices.AddScoped(registerableType, injectableType);
+ break;
+ default:
+ throw new ArgumentOutOfRangeException();
+ }
+ }
+ }
+
+ private static void RegisterSptComponents(IServiceCollection builderServices)
+ {
+ // We get all the services from this assembly first, since mods will override them later
+ RegisterComponents(builderServices, typeof(Program).Assembly.GetTypes()
+ .Where(type => Attribute.IsDefined(type, typeof(Injectable))));
+ }
+}
\ No newline at end of file
diff --git a/Server/Server.csproj b/Server/Server.csproj
new file mode 100644
index 00000000..a6b79698
--- /dev/null
+++ b/Server/Server.csproj
@@ -0,0 +1,25 @@
+
+
+
+ net9.0
+ enable
+ enable
+ Exe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Server/Servers/ConfigServer.cs b/Server/Servers/ConfigServer.cs
new file mode 100644
index 00000000..bf80340b
--- /dev/null
+++ b/Server/Servers/ConfigServer.cs
@@ -0,0 +1,9 @@
+using Types.Annotations;
+using Types.Servers;
+
+namespace Server.Servers;
+
+[Injectable(InjectionType.Singleton)]
+public class ConfigServer : IConfigServer
+{
+}
\ No newline at end of file
diff --git a/Server/Servers/HttpServer.cs b/Server/Servers/HttpServer.cs
new file mode 100644
index 00000000..5802cd39
--- /dev/null
+++ b/Server/Servers/HttpServer.cs
@@ -0,0 +1,105 @@
+using System.Net.WebSockets;
+using System.Text;
+using Types.Annotations;
+using Types.Context;
+using Types.Models.Config;
+using Types.Servers;
+using Types.Services;
+using ILogger = Types.Models.Utils.ILogger;
+
+namespace Server.Servers;
+
+[Injectable(InjectionType.Singleton)]
+public class HttpServer : IHttpServer
+{
+ protected HttpConfig httpConfig;
+ protected bool started;
+
+ private readonly ILogger _logger;
+ private readonly ILocalisationService _localisationService;
+ private readonly IConfigServer _configServer;
+ private readonly IApplicationContext _applicationContext;
+ private readonly IWebSocketServer _webSocketServer;
+
+ public HttpServer(
+ ILogger logger,
+ ILocalisationService localisationService,
+ IConfigServer configServer,
+ IApplicationContext applicationContext,
+ IWebSocketServer webSocketServer
+ )
+ {
+ _logger = logger;
+ _localisationService = localisationService;
+ _configServer = configServer;
+ _applicationContext = applicationContext;
+ _webSocketServer = webSocketServer;
+
+ // TODO: hook up the config server to put the HttpConfig here
+ httpConfig = new HttpConfig() { Ip = "127.0.0.1", Port = 80 };
+ }
+
+ public void Load(WebApplicationBuilder builder)
+ {
+ builder.WebHost.UseKestrel();
+ //builder.Services.AddControllers();
+ // At the end
+ var app = builder.Build();
+
+ // enable web socket
+ app.UseWebSockets();
+
+ app.UseRouting();
+ app.UseEndpoints(endpointBuilder =>
+ {
+ endpointBuilder.MapFallback(HandleFallback);
+ });
+ started = true;
+ app.Run($"http://{httpConfig.Ip}:{httpConfig.Port}");
+ }
+
+ private Task HandleFallback(HttpContext context)
+ {
+ if (context.WebSockets.IsWebSocketRequest)
+ {
+ return context.WebSockets.AcceptWebSocketAsync()
+ .ContinueWith(task => Converse(task.Result));
+ }
+ else
+ {
+ // This http request would be passed through the SPT Router and handled by an ICallback
+ }
+
+ return Task.CompletedTask;
+ }
+
+ private void Converse(WebSocket connection)
+ {
+ var buffer = new byte[1024 * 4];
+ var receive = connection.ReceiveAsync(
+ new ArraySegment(buffer), CancellationToken.None);
+ receive.Wait();
+ var receiveResult = receive.Result;
+
+ while (!receiveResult.CloseStatus.HasValue)
+ {
+ connection.SendAsync(
+ new ArraySegment(buffer, 0, receiveResult.Count),
+ receiveResult.MessageType,
+ receiveResult.EndOfMessage,
+ CancellationToken.None);
+
+ receive = connection.ReceiveAsync(
+ new ArraySegment(buffer), CancellationToken.None);
+ receive.Wait();
+ receiveResult = receive.Result;
+ }
+
+ connection.CloseAsync(
+ receiveResult.CloseStatus.Value,
+ receiveResult.CloseStatusDescription,
+ CancellationToken.None);
+ }
+
+ public bool IsStarted() => started;
+}
\ No newline at end of file
diff --git a/Server/Servers/WebSocketServer.cs b/Server/Servers/WebSocketServer.cs
new file mode 100644
index 00000000..986916bf
--- /dev/null
+++ b/Server/Servers/WebSocketServer.cs
@@ -0,0 +1,9 @@
+using Types.Annotations;
+using Types.Servers;
+
+namespace Server.Servers;
+
+[Injectable(InjectionType.Singleton)]
+public class WebSocketServer : IWebSocketServer
+{
+}
\ No newline at end of file
diff --git a/Server/Services/LocalisationService.cs b/Server/Services/LocalisationService.cs
new file mode 100644
index 00000000..6cd8b9db
--- /dev/null
+++ b/Server/Services/LocalisationService.cs
@@ -0,0 +1,9 @@
+using Types.Annotations;
+using Types.Services;
+
+namespace Server.Services;
+
+[Injectable(InjectionType.Singleton)]
+public class LocalisationService : ILocalisationService
+{
+}
\ No newline at end of file
diff --git a/Server/Utils/Logging/SimpleTextLogger.cs b/Server/Utils/Logging/SimpleTextLogger.cs
new file mode 100644
index 00000000..918a4224
--- /dev/null
+++ b/Server/Utils/Logging/SimpleTextLogger.cs
@@ -0,0 +1,10 @@
+using Types.Annotations;
+using ILogger = Types.Models.Utils.ILogger;
+
+namespace Server.Utils.Logging;
+
+[Injectable(InjectionType.Singleton)]
+public class SimpleTextLogger : ILogger
+{
+
+}
\ No newline at end of file
diff --git a/server-csharp.sln b/server-csharp.sln
new file mode 100644
index 00000000..3c62d5a2
--- /dev/null
+++ b/server-csharp.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{1F5ED9C6-8B1F-4776-85AB-B387CBBC5557}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Core.csproj", "{AC8643DC-8779-4B4A-BBDA-2D4CC466F765}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {1F5ED9C6-8B1F-4776-85AB-B387CBBC5557}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F5ED9C6-8B1F-4776-85AB-B387CBBC5557}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1F5ED9C6-8B1F-4776-85AB-B387CBBC5557}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1F5ED9C6-8B1F-4776-85AB-B387CBBC5557}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AC8643DC-8779-4B4A-BBDA-2D4CC466F765}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AC8643DC-8779-4B4A-BBDA-2D4CC466F765}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AC8643DC-8779-4B4A-BBDA-2D4CC466F765}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AC8643DC-8779-4B4A-BBDA-2D4CC466F765}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal