How viktorhafdal/oddevenserver works
Project type and purpose
• This is a simple client–server console application written in C#/.NET 8.0.
• Purpose: students’ exam task to build a multi-threaded server that receives numeric input from a client; if the number is even/odd it replies “even”/“odd” the first time and “even again”/“odd again” on subsequent occurrences.
File structure
• Top-level solution file: OddEvenServer.sln
• Three subprojects:
• Server (Server.csproj) – hosts the multi-threaded TCP server
– Key classes: ClientManager (accepts connections), ClientWorker (per-client handler), Program.cs (entry point)
• Client (Client.csproj) – console client connecting over TCP to the Server
– Contains Client.cs (logic to connect, send numbers, receive responses), Program.cs (entry point)
• Program (Program.csproj) – appears to be a standalone console app (likely a test harness or alternative entry point)
• Each project folder has its own bin/obj artifacts, .csproj, and Program.cs.
README for additional insights
• Describes threading behavior and expected response patterns for even/odd numbers.
• No external dependencies other than .NET Core runtime.
Detailed capture of essential architectural elements
• That each incoming connection spins up a ClientWorker (a thread or Task) which invokes the odd/even stateful logic.
• If the Program project is relevant to your deployment or testing, include it as its own process.