Skip to content

🗳️ An online vote casting system using TCP multi-threaded client-server program. The voters will log on from client systems and cast their votes.

License

Notifications You must be signed in to change notification settings

harismuneer/Online-Voting-System-TCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🗳️ Online Voting System using Multi-Threaded TCP Sockets

views Open Source Love svg1 GitHub Forks GitHub Issues contributions welcome

This is an online vote casting system using TCP multithreaded server-client program. The voters will log on from client systems and cast their votes.

Description

System should be secure and should only allow clients with authentic name and CNIC to cast the vote.

• A list of registered voters is available in a text file in the following format: Name/CNIC number

Complete Workflow

The Server shall:

• First of all take the client’s name and CNIC and match it with the content of the text file (Voters_List.txt).

• If the details match, then it will welcome the voter and display the names and poll symbols of the candidates on the terminal.(Candidates_List.txt)

• The voter will then cast the vote by mentioning the poll symbol (not the name) of the candidate. All these details are to be recorded in an output text file. This system should work perfectly for at least 5 different clients at the same time.

• If there is problem of load shedding of electric light, then your system should not lose track of the votes being already casted once your server restarts again when light comes back on.

• Assume that when the record of votes will be written by one thread in an output file, no other thread will make a read to the output file.

Note

• One client can cast a vote ONCE AND ONLY ONCE.

• The Server should allocate a new thread for every new incoming Client.

How to Run

The client. and server.c files are provided. Just compile each file using the following command on Linux terminal or Windows Bash and run it (For client, obviously replace the server.c filename with client.c). Make sure the server is running before running any client.

gcc –pthread server.c -o server.out


Author

You can get in touch with me on my LinkedIn Profile: LinkedIn Link

You can also follow my GitHub Profile to stay updated about my latest projects: GitHub Follow

If you liked the repo then kindly support it by giving it a star ⭐ and share in your circles so more people can benefit from the effort.

Contributions Welcome

GitHub Issues

If you find any bugs, have suggestions, or face issues:

  • Open an Issue in the Issues Tab to discuss them.
  • Submit a Pull Request to propose fixes or improvements.
  • Review Pull Requests from other contributors to help maintain the project's quality and progress.

This project thrives on community collaboration! Members are encouraged to take the initiative, support one another, and actively engage in all aspects of the project. Whether it’s debugging, fixing issues, or brainstorming new ideas, your contributions are what keep this project moving forward.

With modern AI tools like ChatGPT, solving challenges and contributing effectively is easier than ever. Let’s work together to make this project the best it can be! 🚀

License

MIT

Copyright (c) 2018-present, harismuneer


Waving hand Hey there, I'm Haris Muneer 👨🏻‍💻

Total Github Stars Total Github Followers


  • 🕸️ Founder of Cyfy Labs: At Cyfy Labs, we provide advanced social media scraping tools that enable businesses, researchers, and marketers to extract actionable insights from platforms like Facebook, Instagram, and X (formerly Twitter). Our tools are designed for use cases such as lead generation, market research, social listening, and more. Learn more at www.cyfylabs.com

  • 🌟 Open Source Advocate: Passionate about making technology accessible, I’ve developed and open-sourced several software projects for web, mobile, desktop, and AI on my GitHub profile. These projects have been used by thousands of learners worldwide to enhance their skills and knowledge.

  • 📫 How to Reach Me: To learn more about my skills and work, visit my LinkedIn profile. For collaboration or inquiries, feel free to reach out via email. For Cyfy Labs related queries, please contact us through our company website.


🤝 Follow my journey