{"id":21741975,"url":"https://github.com/mortinger91/cpp-tcp-udp-sockets","last_synced_at":"2025-09-17T09:34:08.649Z","repository":{"id":200571507,"uuid":"705782877","full_name":"mortinger91/cpp-tcp-udp-sockets","owner":"mortinger91","description":"A somewhat educational project featuring sockets. TCP and UDP server and client","archived":false,"fork":false,"pushed_at":"2024-05-28T10:20:56.000Z","size":116,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T17:52:05.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mortinger91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-10-16T17:20:26.000Z","updated_at":"2024-05-28T10:21:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"6d470b9d-9b38-44cb-ae30-2b82f537033a","html_url":"https://github.com/mortinger91/cpp-tcp-udp-sockets","commit_stats":null,"previous_names":["mortinger91/cpp-tcp-udp-sockets"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mortinger91/cpp-tcp-udp-sockets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortinger91%2Fcpp-tcp-udp-sockets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortinger91%2Fcpp-tcp-udp-sockets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortinger91%2Fcpp-tcp-udp-sockets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortinger91%2Fcpp-tcp-udp-sockets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mortinger91","download_url":"https://codeload.github.com/mortinger91/cpp-tcp-udp-sockets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortinger91%2Fcpp-tcp-udp-sockets/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264608131,"owners_count":23636683,"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":[],"created_at":"2024-11-26T06:42:22.087Z","updated_at":"2025-09-17T09:34:08.557Z","avatar_url":"https://github.com/mortinger91.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![main](https://github.com/mortinger91/cpp-tcp-udp-sockets/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/mortinger91/cpp-tcp-udp-sockets/actions/workflows/main.yml)\n\n# cpp-tcp-udp-sockets\n\n### Easy CMake C++ project that uses sockets. Supports Linux and macOS.   \n\n- TCP server:  \nListen on a port for incoming TCP connections.  \nPrints everything it receives through the connection in the stdout.  \nSends the message it has received through the connection.\n- TCP client:  \nConnect to an endpoint and port.  \nPrints everything it receives through the connection in the stdout.\n- UDP server:  \nListen on a port for incoming UDP datagrams.  \nMultiple clients can send datagrams at its IP address and port.  \nPrints everything it receives in the stdout.  \nSends back to the specific client the message it has received.  \n- UDP client:  \nConnect to an endpoint and port.  \nPrints everything it receives through the connection in the stdout.\n\nRequirements:\n--------------\n- CMake\n- Clang\n- LLDB\n- clang-format (optional)\n- VSCode 'CodeLLDB' extension (optional)\n\nSet up project:\n--------------\n    ./ProjectFolder/scripts/build_cmake_debug.sh\n\nor execute VSCode task `build_cmake_debug`.\n\nBuild and Debug:\n----------------\n    ./ProjectFolder/scripts/build_debug.sh\n\nFollowed by:\n\n    lldb ./build/Debug/bin/cpp-cmake-template\n\nor launch VSCode `DEBUG` configuration.\n\nRun tests:\n----------\n    ./ProjectFolder/scripts/run_tests.sh\n\nor execute VSCode task `run_tests`.\n\n### Run tests in a Docker container:\n\n    docker compose down --volumes --rmi all\n    docker compose up\n\nBuild release:\n--------------\n    ./ProjectFolder/scripts/create_release.sh\n\nor execute VSCode task ```create_release```.\n\nNotes:\n=======\n\n- To add new files: \n    - create a new folder in ```ProjectFolder/src```  \n    - add ```*.cpp``` and ```*.h``` files into it.\n    - Remember to re-run ```build_cmake_debug```\n- To add new tests: \n    - add new ```test_*.cpp``` files in ```ProjectFolder/test```.  \n    - Remember to re-run ```build_cmake_debug```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmortinger91%2Fcpp-tcp-udp-sockets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmortinger91%2Fcpp-tcp-udp-sockets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmortinger91%2Fcpp-tcp-udp-sockets/lists"}