Hello, you know, there are some programs that run locally, such as TCLights or Mary, and I want to make a similar program, I think it will be in C#. Can you help me where to start and what to do?
However, if you feel exhausted of haveing to manage network connections, I suggest it's better at this time to try to learn WebAssembly, especially the Component Model, it will give you some fun and learning too, and as time passes by it will allow you to interact with LFS too, as there's tool being developed for that.
To save yourself from some pain and headache in the long run. You should use multiple classes (instead of one class for everything) following SRP (Single Responsibility Principle)
Regarding managing connections, you should look into LFSServerRuleEnforcer github repository. It was developed by xspeedasx.
InSim.txt is valuable as well for packet documentation.