Find the bug ๐ต๏ธ
Problem Statement
- We all know about servers and know how it works, some of us might be curious about them. Making server-based applications are not a big task if we find a nice and good article. You might even have thought of making one someday.
What if we say that you can make a client-server-based CLI application using C#? Yes, We have provided you with a client server-based application using Microsoft's framework, .NET, which is based on C#. The application provided to you actually sends some data from the client to the server, which will be stored in a JSON file. We have provided you with the source code for these which has some errors ๐. Try to solve the bugs and complete the client-server application.
๐ค What To & How To
- Here as we are testing the application, we will be running both the server and client on the same device.
- You have to just debug both server-side and client-side code using your favourite IDE such that you are able to successfully run it in on your system and make them communicate(in your system itself)
- ๐ก Keep an eye on the comments in the code to get a better idea of where the bugs might be.
- Open both client and server directories separately and run it using the
dotnet runcommand. - Note: you should run the server first and then the client, otherwise client won't be able to communicate to the server.
๐คฉ Bonus
These are optional tasks you can take up, only if you are interested and you have implemented the basic functionalities
- If your OS is Windows, you can also try adding GUI to the application using Visual Code
- You can add any extra features to the application like asking for any other extra date, etc. It can be anything provided your app runs.
๐ Resources
- Intro
- Synchronous Server Socket Example
- Synchronous Client Socket Example
- Reference For Client Server Application
Working Sample
This video shows how the final application should be like