[PR #577] [MERGED] [enhancement] Client_server folder code updated for windows OS as well. #1006

Open
opened 2026-01-29 15:16:46 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/577
Author: @kvedala
Created: 7/20/2020
Status: Merged
Merged: 7/22/2020
Merged by: @kvedala

Base: masterHead: client_server_win


📝 Commits (10+)

📊 Changes

6 files changed (+261 additions, -38 deletions)

View changed files

📝 CMakeLists.txt (+1 -0)
client_server/CMakeLists.txt (+45 -0)
📝 client_server/client.c (+59 -7)
📝 client_server/server.c (+70 -13)
📝 client_server/udp_client.c (+42 -9)
📝 client_server/udp_server.c (+44 -9)

📄 Description

Description of Change

Existing implementations used BSD sockets and would not compile using MSVC. Code is now updated to use Winsock on windows and BSD sockets on *nix platforms.

References

Closes #572

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/577 **Author:** [@kvedala](https://github.com/kvedala) **Created:** 7/20/2020 **Status:** ✅ Merged **Merged:** 7/22/2020 **Merged by:** [@kvedala](https://github.com/kvedala) **Base:** `master` ← **Head:** `client_server_win` --- ### 📝 Commits (10+) - [`52a7176`](https://github.com/TheAlgorithms/C/commit/52a71762e12958ba6ba4e9cb1fe59a93efb3381f) update codes to run on Windows platform as well - [`f13da14`](https://github.com/TheAlgorithms/C/commit/f13da14e0460760a157bcd4e396feb8aee433bb2) added cmake for client_server - [`0cde0c6`](https://github.com/TheAlgorithms/C/commit/0cde0c65a66ae47abcd2dfc525bec62f62f382dd) added scope parameters - [`4b45cf9`](https://github.com/TheAlgorithms/C/commit/4b45cf9011604524ebb42b9b466d875c42aae5e2) force use of unistd.h in non-windows - [`41b829d`](https://github.com/TheAlgorithms/C/commit/41b829df3cf7229dbb4e631bc768007c5e4fe891) use size_t instead of int - [`ac0991e`](https://github.com/TheAlgorithms/C/commit/ac0991eb5103ee6b36f74ba6fd1845dae371707b) use unsigned int instead of size_t - [`c82ce25`](https://github.com/TheAlgorithms/C/commit/c82ce25408b4ac56d1fe48b2f7643251c7443489) clang-tidy fixes for ac0991eb5103ee6b36f74ba6fd1845dae371707b - [`8252ed1`](https://github.com/TheAlgorithms/C/commit/8252ed1f8ff36a8333a7bdff5e7d5a36f468f18c) updated UDP server-client as well - [`29cb97a`](https://github.com/TheAlgorithms/C/commit/29cb97ad6cb66dfc28e663e117362b89af494987) use unsigned int - [`61f1df0`](https://github.com/TheAlgorithms/C/commit/61f1df0f526658a20ba021d1010deed945145f82) added documentation ### 📊 Changes **6 files changed** (+261 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+1 -0) ➕ `client_server/CMakeLists.txt` (+45 -0) 📝 `client_server/client.c` (+59 -7) 📝 `client_server/server.c` (+70 -13) 📝 `client_server/udp_client.c` (+42 -9) 📝 `client_server/udp_server.c` (+44 -9) </details> ### 📄 Description #### Description of Change <!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Contributors guide: https://github.com/TheAlgorithms/C-Plus-Plus/CONTRIBUTING.md --> Existing implementations used BSD sockets and would not compile using MSVC. Code is now updated to use Winsock on windows and BSD sockets on *nix platforms. #### References <!-- Add any reference to previous pull-request or issue --> Closes #572 #### Checklist <!-- Remove items that do not apply. For completed items, change [ ] to [x]. --> - [x] Added description of change - [x] Added file name matches [File name guidelines](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md#New-File-Name-guidelines) - [x] Added tests and example, test must pass - [x] Relevant documentation/comments is changed or added - [x] PR title follows semantic [commit guidelines](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md#Commit-Guidelines) - [x] Search previous suggestions before making a new one, as yours may be a duplicate. - [x] I acknowledge that all my contributions will be made under the project's license. Notes: <!-- Please add a one-line description for developers or pull request viewers --> <a href="https://gitpod.io/#https://github.com/TheAlgorithms/C/pull/577"><img src="https://gitpod.io/api/apps/github/pbs/github.com/kvedala/C.git/35eaf63fa79f041b27ec49efc9020366893dbdcf.svg" /></a> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:16:47 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#1006