A simple pair of windows forms applications to use as a starting point. Made using visual studio 2022 and C#.
Why? As I was looking for a simple UDP server and client pair to use as a basis for a personal project of mine I couldn't find any so I made my own, to use as a starting point. I wanted this to be a very very simple platform and easy to modify or build upon.
- You need to have visual studio installed
- Clone the repository
- Open each project from .sln file
- After visual studio starts up, hit the run button for each
- The server autodetects its own IP address and prints it in the "IP" textbox
- Start the server
- Fill in the correct IP in the client
- Send a message
As a reply to the first message from a new client the server tell the client which number was assinged to it as a unique id. As of now this id is not really used for anything.
- Supports multiple clients
- Assigns an unique id to every client (a rolling int by default)
- Some preset specific replies from the server, eg. sending a "hello" prompts the server to reply with a "world!"
- Server could have a visible list of connected clients.
- Server should maybe have an option to stop and restart it.
- Client could remember a number of server IPs it has recently been connected to.
- Clients should send a heartbeat.
- Clients should timeout and drop out from the server if not heard from in a while.
And as always, if you see an obvious way to make this better, while keeping everything simple, leave a pull request.
