{"id":15136918,"url":"https://github.com/stackoverflowexcept1on/tcp-daemon-for-linux","last_synced_at":"2026-02-09T00:04:26.845Z","repository":{"id":138029620,"uuid":"588092624","full_name":"StackOverflowExcept1on/tcp-daemon-for-linux","owner":"StackOverflowExcept1on","description":"TCP client-server application written in C++20 using Boost.Asio","archived":false,"fork":false,"pushed_at":"2023-01-15T19:36:07.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T03:45:24.832Z","etag":null,"topics":["boost-asio","cmake","conan","cpp20","linux"],"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/StackOverflowExcept1on.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-01-12T10:01:31.000Z","updated_at":"2023-01-12T10:07:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7ca8d66-9311-45e1-986d-75bbd0f7fad3","html_url":"https://github.com/StackOverflowExcept1on/tcp-daemon-for-linux","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/StackOverflowExcept1on%2Ftcp-daemon-for-linux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2Ftcp-daemon-for-linux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2Ftcp-daemon-for-linux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackOverflowExcept1on%2Ftcp-daemon-for-linux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StackOverflowExcept1on","download_url":"https://codeload.github.com/StackOverflowExcept1on/tcp-daemon-for-linux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430835,"owners_count":20937873,"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":["boost-asio","cmake","conan","cpp20","linux"],"created_at":"2024-09-26T06:41:47.021Z","updated_at":"2026-02-09T00:04:26.832Z","avatar_url":"https://github.com/StackOverflowExcept1on.png","language":"C++","readme":"### TCP client \u0026 server (C++20 \u0026 Boost.Asio)\n\n[![Build Status](https://github.com/StackOverflowExcept1on/tcp-daemon-for-linux/actions/workflows/ci.yml/badge.svg)](https://github.com/StackOverflowExcept1on/tcp-daemon-for-linux/actions/workflows/ci.yml)\n\n[![asciicast](https://asciinema.org/a/zxX8zMCGW5bf8zSJtSe1Z4EI5.svg)](https://asciinema.org/a/zxX8zMCGW5bf8zSJtSe1Z4EI5)\n\nThis is one of the cool tasks from my university\n\n### Task description\n\nImplement a multi-threaded client-server application under Linux.\n\n- Client is a program launched from the console\n- The server is a daemon that gracefully terminates on `SIGTERM` and `SIGHUP` signals\n- The client must transfer the contents of the text file via TCP\n- The server must accept connection and save TCP stream to a file\n\n### Requirements\n\n- cmake\n- conan\n\n### Building\n\n```bash\n./build.sh\n```\n\n### Integration with CLion\n\nBy default, this may result in an error, to fix this:\n1. execute `cd cmake-build-debug \u0026\u0026 conan install ..`\n2. refresh CMake build\n\n### Server\n\n```bash\n# run server at port 1234\n./build/bin/server 1234\n\n# check that daemon started\nlsof -i :1234\n\n# connect to server using netcat\necho \"some data\" | nc -N 0.0.0.0 1234\n\n# read logs of the daemon\ngrep tcp_server_daemon /var/log/syslog\n\n# clear syslog\nsudo truncate -s 0 /var/log/syslog\n```\n\n### Client\n\n```bash\n# generate random file\nhead -c 1G \u003c/dev/urandom \u003e large\nsha256sum large\n\n# send file to the server\n./build/bin/client 127.0.0.1 1234 large\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackoverflowexcept1on%2Ftcp-daemon-for-linux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackoverflowexcept1on%2Ftcp-daemon-for-linux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackoverflowexcept1on%2Ftcp-daemon-for-linux/lists"}