{"id":28717179,"url":"https://github.com/stratblues/game_protocol_quic","last_synced_at":"2025-10-06T19:59:30.715Z","repository":{"id":298017201,"uuid":"998021574","full_name":"stratblues/game_protocol_QUIC","owner":"stratblues","description":"application protocol built ontop of MsQuic, flexible header logic for implementations","archived":false,"fork":false,"pushed_at":"2025-06-08T23:35:29.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-09T00:26:39.381Z","etag":null,"topics":["cpp","networking","protocol","quic"],"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/stratblues.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,"zenodo":null}},"created_at":"2025-06-07T17:43:46.000Z","updated_at":"2025-06-08T23:35:33.000Z","dependencies_parsed_at":"2025-06-09T00:26:42.816Z","dependency_job_id":"aef0c75b-efa1-471e-8a6e-815cf3ece7dd","html_url":"https://github.com/stratblues/game_protocol_QUIC","commit_stats":null,"previous_names":["stratblues/game_protocol_quic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stratblues/game_protocol_QUIC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stratblues%2Fgame_protocol_QUIC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stratblues%2Fgame_protocol_QUIC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stratblues%2Fgame_protocol_QUIC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stratblues%2Fgame_protocol_QUIC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stratblues","download_url":"https://codeload.github.com/stratblues/game_protocol_QUIC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stratblues%2Fgame_protocol_QUIC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278671745,"owners_count":26025744,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cpp","networking","protocol","quic"],"created_at":"2025-06-15T03:13:35.249Z","updated_at":"2025-10-06T19:59:30.663Z","avatar_url":"https://github.com/stratblues.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# myprotocol\n\nA simple client-server sample using the Microsoft MsQuic API. \n\n---\n\n## Table of Contents\n\n* [Overview](#overview)\n* [Dependencies](#dependencies)\n* [Certificate Generation](#certificate-generation)\n* [Building](#building)\n* [Running](#running)\n* [Project Structure](#project-structure)\n* [License](#license)\n\n---\n\n## Overview\n\nThis repository contains:\n\n* **`gameprotocol.cpp`**: Implementation of a minimal client and server using MsQuic.\n* **`protocol.hpp`**: Shared protocol definitions (PDU, message types).\n* **`CMakeLists.txt`**: CMake build script.\n\nThe client:\n\n1. Opens a QUIC connection to the server.\n2. Creates a bidirectional stream.\n3. Sends messages 1 through 10 (state updates).\n4. Closes its send direction and awaits the server’s FIN.\n\nThe server:\n\n1. Listens on UDP port 4567.\n2. Accepts QUIC connections and streams.\n3. Echoes each received counter back to the client.\n4. Shuts down its send direction on receiving message 10.\n\n---\n\n## Dependencies\n\n* **CMake** ≥ 3.18\n* **A C++17 toolchain** (GCC/Clang)\n* **MsQuic** library installed and discoverable via CMake `find_package(msquic CONFIG REQUIRED)`.\n* On Linux: `pthread` and `dl` (loaded automatically by the CMakeLists).\n* **OpenSSL** (for certificate generation) or use the instructions below.\n\n---\n\n## Certificate Generation\n\n### Self-signed certificate (Linux/OpenSSL)\n\n```bash\n# Generate a 2048-bit RSA key and self-signed cert\nopenssl req -nodes -new -x509 -keyout server.key -out server.crt \\\n  -subj \"/CN=localhost\" -days 365\n```\n\nCopy `server.crt` and `server.key` to a known location (e.g. `/tmp/`).\n\n---\n\n## Building\n\n```bash\n# From the root of the repository:\nmkdir -p build \u0026\u0026 cd build\ncmake -DCMAKE_BUILD_TYPE=Debug ..\ncmake --build .\n```\n\nThis produces the executable `myprotocol` in `build/` (or `out/`, depending on your CMake generator).\n\n---\n\n## Running\n\n### Server\n\nOpen a terminal and run:\n\n```bash\n./myprotocol \\\n  -server \\\n  -cert_file:/tmp/server.crt \\\n  -key_file:/tmp/server.key\n```\n\n* **`-server`**: run in server mode\n* **`-cert_file`**: path to TLS certificate\n* **`-key_file`**: path to private key\n\n### Client\n\nIn a second terminal, run:\n\n```bash\n./myprotocol \\\n  -client \\\n  -unsecure \\\n  -target:127.0.0.1\n```\n\n* **`-client`**: run in client mode\n* **`-unsecure`**: skip certificate validation (for testing)\n* **`-target`**: server address (IPv4 or hostname)\n\n\n\n---\n\n## Project Structure\n\n```text\n.\n├── CMakeLists.txt        # Build script\n├── protocol.hpp          # Shared PDU/message definitions\n└── gameprotocol.cpp      # Client \u0026 server implementation\n```\n\n---\n\n## License\n\nLicensed under the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstratblues%2Fgame_protocol_quic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstratblues%2Fgame_protocol_quic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstratblues%2Fgame_protocol_quic/lists"}