{"id":21523176,"url":"https://github.com/harismuneer/Online-Voting-System-TCP","last_synced_at":"2025-07-16T07:31:17.018Z","repository":{"id":108166957,"uuid":"164431642","full_name":"OSSpk/Online-Voting-System-TCP","owner":"OSSpk","description":"🗳️ An online vote casting system using TCP multi-threaded client-server program. The voters will log on from client systems and cast their votes.","archived":false,"fork":false,"pushed_at":"2024-11-22T11:57:59.000Z","size":32,"stargazers_count":8,"open_issues_count":1,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-22T12:36:55.759Z","etag":null,"topics":["c-client","c-server","client-server","client-server-interaction","multi-threaded-server","multi-threading","multithreaded-tcp-server","network-application","network-programming","networking-application","socket-communication","socket-programming","socket-server","tcp-protocol","tcp-server","tcp-socket","tcp-socket-programming","tcp-tutorial","transmission-control-protocol","voting-application"],"latest_commit_sha":null,"homepage":"https://github.com/harismuneer","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OSSpk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.cyfylabs.com"]}},"created_at":"2019-01-07T12:47:32.000Z","updated_at":"2024-11-22T11:58:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7cbdfd8-4eeb-4532-bb40-fcd218d7205b","html_url":"https://github.com/OSSpk/Online-Voting-System-TCP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSpk%2FOnline-Voting-System-TCP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSpk%2FOnline-Voting-System-TCP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSpk%2FOnline-Voting-System-TCP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSSpk%2FOnline-Voting-System-TCP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OSSpk","download_url":"https://codeload.github.com/OSSpk/Online-Voting-System-TCP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226112968,"owners_count":17575438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-client","c-server","client-server","client-server-interaction","multi-threaded-server","multi-threading","multithreaded-tcp-server","network-application","network-programming","networking-application","socket-communication","socket-programming","socket-server","tcp-protocol","tcp-server","tcp-socket","tcp-socket-programming","tcp-tutorial","transmission-control-protocol","voting-application"],"created_at":"2024-11-24T01:12:54.176Z","updated_at":"2025-07-16T07:31:16.990Z","avatar_url":"https://github.com/OSSpk.png","language":"C","funding_links":["https://www.cyfylabs.com"],"categories":[],"sub_categories":[],"readme":"# 🗳️ Online Voting System using Multi-Threaded TCP Sockets\n\u003ca href=\"https://github.com/harismuneer\"\u003e\u003cimg alt=\"views\" title=\"Github views\" src=\"https://komarev.com/ghpvc/?username=harismuneer\u0026style=flat-square\" width=\"125\"/\u003e\u003c/a\u003e\n[![Open Source Love svg1](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](#)\n[![GitHub Forks](https://img.shields.io/github/forks/harismuneer/Online-Voting-System-TCP.svg?style=social\u0026label=Fork\u0026maxAge=2592000)](https://www.github.com/harismuneer/Online-Voting-System-TCP/fork)\n[![GitHub Issues](https://img.shields.io/github/issues/harismuneer/Online-Voting-System-TCP.svg?style=flat\u0026label=Issues\u0026maxAge=2592000)](https://www.github.com/harismuneer/Online-Voting-System-TCP/issues)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat\u0026label=Contributions\u0026colorA=red\u0026colorB=black\t)](#)\n\n\nThis is an online vote casting system using **TCP multithreaded server-client program**. The voters will log on from client systems and cast their votes. \n\n## Description\nSystem should be secure and should only allow clients with authentic name and CNIC to cast the vote.\n\n• A list of registered voters is available in a text file in the following format: **Name/CNIC number**\n\n## Complete Workflow\nThe Server shall:\n\n•\tFirst of all take the **client’s name and CNIC** and match it with the content of the text file **(Voters_List.txt)**. \n\n•\tIf 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) \n\n•\tThe 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**. \n\n•\tIf 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.\n\n•\tAssume 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.\n\n## Note\n•\tOne client can cast a vote ONCE AND ONLY ONCE.\n\n•\tThe Server should **allocate a new thread for every new incoming Client**. \n\n## How to Run\nThe 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.\n\n``` gcc –pthread server.c -o server.out ```\n\n\n\u003chr\u003e\n\n\n## Author\nYou can get in touch with me on my LinkedIn Profile: [![LinkedIn Link](https://img.shields.io/badge/Connect-harismuneer-blue.svg?logo=linkedin\u0026longCache=true\u0026style=social\u0026label=Follow)](https://www.linkedin.com/in/harismuneer)\n\nYou can also follow my GitHub Profile to stay updated about my latest projects: [![GitHub Follow](https://img.shields.io/badge/Connect-harismuneer-blue.svg?logo=Github\u0026longCache=true\u0026style=social\u0026label=Follow)](https://github.com/harismuneer)\n\nIf 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.\n\n## Contributions Welcome\n[![GitHub Issues](https://img.shields.io/github/issues/harismuneer/Online-Voting-System-TCP.svg?style=flat\u0026label=Issues\u0026maxAge=2592000)](https://www.github.com/harismuneer/Online-Voting-System-TCP/issues)\n\nIf you find any bugs, have suggestions, or face issues:\n\n- Open an Issue in the Issues Tab to discuss them.\n- Submit a Pull Request to propose fixes or improvements.\n- Review Pull Requests from other contributors to help maintain the project's quality and progress.\n\nThis 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.\n\nWith 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! 🚀\n\n## License\n[![MIT](https://img.shields.io/cocoapods/l/AFNetworking.svg?style=style\u0026label=License\u0026maxAge=2592000)](../master/LICENSE)\n\nCopyright (c) 2018-present, harismuneer                                                        \n\n\u003c!-- PROFILE_INTRO_START --\u003e\n\n\u003chr\u003e\n\n\u003ch1\u003e \u003ca href=\"#\"\u003e\u003cimg src=\"https://media.giphy.com/media/hvRJCLFzcasrR4ia7z/giphy.gif\" alt=\"Waving hand\" width=\"28\"\u003e\u003c/a\u003e\nHey there, I'm \u003ca href=\"https://www.linkedin.com/in/harismuneer/\"\u003eHaris Muneer\u003c/a\u003e 👨🏻‍💻\n\u003c/h1\u003e\n\n\n\u003ca href=\"https://github.com/harismuneer\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/harismuneer\" alt=\"Total Github Stars\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/harismuneer?tab=followers\"\u003e\u003cimg src=\"https://img.shields.io/github/followers/harismuneer\" alt=\"Total Github Followers\"\u003e\u003c/a\u003e\n\n\u003chr\u003e\n\n- \u003cb\u003e🛠️ Product Builder:\u003c/b\u003e Agile Product Manager with 5+ years of hands-on experience delivering SaaS solutions across sales, recruiting, AI, social media, and public sector domains. Background in Computer Science, with a proven track record of scaling products from inception to $XXM+ ARR, launching 3 top-ranking tools on Product Hunt, and developing solutions adopted by 250+ B2B clients in 40+ countries.  \n \n- \u003cb\u003e🌟 Open Source Advocate:\u003c/b\u003e Passionate about making technology accessible, I’ve developed and open-sourced several software projects for web, mobile, desktop, and AI on my \u003ca href=\"https://github.com/harismuneer\"\u003eGitHub profile\u003c/a\u003e. These projects have been used by thousands of learners worldwide to enhance their skills and knowledge.\n\n- \u003cb\u003e📫 How to Reach Me:\u003c/b\u003e To learn more about my skills and work, visit my \u003ca href=\"https://www.linkedin.com/in/harismuneer\"\u003eLinkedIn profile\u003c/a\u003e. For collaboration or inquiries, feel free to reach out via \u003ca href=\"mailto:haris.muneer5@gmail.com\"\u003eemail\u003c/a\u003e.\n\n\u003chr\u003e\n\n\u003ch2 align=\"left\"\u003e🤝 Follow my journey\u003c/h2\u003e\n\u003cp align=\"left\"\u003e\n  \u003ca href=\"https://www.linkedin.com/in/harismuneer\"\u003e\u003cimg title=\"Follow Haris Muneer on LinkedIn\" src=\"https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/harismuneer\"\u003e\u003cimg title=\"Follow Haris Muneer on GitHub\" src=\"https://img.shields.io/badge/GitHub-100000?style=for-the-badge\u0026logo=github\u0026logoColor=white\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.youtube.com/@haris_muneer?sub_confirmation=1\"\u003e\u003cimg title=\"Subscribe on YouTube\" src=\"https://img.shields.io/badge/YouTube-FF0000?style=for-the-badge\u0026logo=youtube\u0026logoColor=white\"/\u003e\u003c/a\u003e \n  \u003ca href=\"mailto:haris.muneer5@gmail.com\"\u003e\u003cimg title=\"Email\" src=\"https://img.shields.io/badge/Gmail-D14836?style=for-the-badge\u0026logo=gmail\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\n\u003c!-- PROFILE_INTRO_END --\u003e\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharismuneer%2FOnline-Voting-System-TCP","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharismuneer%2FOnline-Voting-System-TCP","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharismuneer%2FOnline-Voting-System-TCP/lists"}