Add networking foundation — 9-project C# solution (compiles clean)

Implements the modular networking layer for SOR Server:
- SOR.Networking.Abstractions: pure interfaces (ITransport, IClientConnection,
  IMessageSerializer, IMessageDispatcher, IMessageHandler, IEventBus, IClientPush)
- SOR.Networking.WebSocket: ITransport + IClientConnection over System.Net.WebSockets
- SOR.Networking.Nats: IEventBus over NATS.Net (INatsConnection)
- SOR.Networking.Redis: IClientPush over Redis Pub/Sub
- SOR.Shared: ServiceResult<T>, RedisKeys, NatsSubjects, ServerMessage, JSON serializer
- SOR.Shared.Proto: auth.proto with gRPC AuthService contract
- SOR.Gateway: accept loop, auth handshake, dispatcher, Redis push subscriber
- SOR.Auth: stub gRPC handler (placeholder responses)
- SOR.Host: multi-service runner via ENABLED_SERVICES env var; wires all DI

All concrete implementations are wired exclusively in SOR.Host — every transport,
broker, and push implementation can be swapped by changing only Program.cs.

dotnet build SOR.slnx → 0 errors, 0 warnings

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-02-24 21:01:38 -05:00
co-authored by Claude Happy
parent 0f95a0721b
commit d21adbc8d0
52 changed files with 3522 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<AssemblyName>SOR.Host</AssemblyName>
<!-- OutputType=Exe: this is the executable entry point for the entire server.
All other projects are libraries (no OutputType means library by default).
There is exactly one executable project in the solution. -->
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<!-- Infrastructure clients — registered once in Host, shared by all services -->
<PackageReference Include="StackExchange.Redis" />
<PackageReference Include="NATS.Net" />
<!-- Serilog: structured logging provider -->
<PackageReference Include="Serilog.AspNetCore" />
<PackageReference Include="Serilog.Sinks.Console" />
<!-- All service modules and networking transports.
SOR.Host is the ONLY project that references both the abstractions
AND their concrete implementations. All other projects reference only
Abstractions — the wiring happens here. -->
<ProjectReference Include="..\SOR.Shared\SOR.Shared.csproj" />
<ProjectReference Include="..\SOR.Shared.Proto\SOR.Shared.Proto.csproj" />
<ProjectReference Include="..\SOR.Networking.Abstractions\SOR.Networking.Abstractions.csproj" />
<ProjectReference Include="..\SOR.Networking.WebSocket\SOR.Networking.WebSocket.csproj" />
<ProjectReference Include="..\SOR.Networking.Nats\SOR.Networking.Nats.csproj" />
<ProjectReference Include="..\SOR.Networking.Redis\SOR.Networking.Redis.csproj" />
<ProjectReference Include="..\SOR.Gateway\SOR.Gateway.csproj" />
<ProjectReference Include="..\SOR.Auth\SOR.Auth.csproj" />
</ItemGroup>
</Project>