{"id":28064636,"url":"https://github.com/yeshasvitirupachuri/oatpp-websocket-server-client-example","last_synced_at":"2025-05-12T13:54:27.651Z","repository":{"id":184251139,"uuid":"671409142","full_name":"yeshasvitirupachuri/oatpp-websocket-server-client-example","owner":"yeshasvitirupachuri","description":"Oatpp server client c++ examples without using dependency injection framework macros components.","archived":false,"fork":false,"pushed_at":"2023-07-31T07:24:41.000Z","size":4934,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-07-31T08:29:59.172Z","etag":null,"topics":["cpp","cpp17","network","oatpp","oatppwebsocket"],"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/yeshasvitirupachuri.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}},"created_at":"2023-07-27T08:51:08.000Z","updated_at":"2023-07-27T14:47:44.000Z","dependencies_parsed_at":"2023-07-27T17:36:04.048Z","dependency_job_id":null,"html_url":"https://github.com/yeshasvitirupachuri/oatpp-websocket-server-client-example","commit_stats":null,"previous_names":["yeshasvitirupachuri/oatpp-websocket-server-client-example"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeshasvitirupachuri%2Foatpp-websocket-server-client-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeshasvitirupachuri%2Foatpp-websocket-server-client-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeshasvitirupachuri%2Foatpp-websocket-server-client-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeshasvitirupachuri%2Foatpp-websocket-server-client-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeshasvitirupachuri","download_url":"https://codeload.github.com/yeshasvitirupachuri/oatpp-websocket-server-client-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253753492,"owners_count":21958833,"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":["cpp","cpp17","network","oatpp","oatppwebsocket"],"created_at":"2025-05-12T13:54:26.580Z","updated_at":"2025-05-12T13:54:27.636Z","avatar_url":"https://github.com/yeshasvitirupachuri.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oatpp websocket server \u0026 client c++ examples\n\nOriginal C++ [oatpp websocket examples](https://github.com/oatpp/example-websocket) are implemented through `OATPP_CREATE_COMPONENT` and `OATPP_COMPONENT` macros,\nthat are part of oatpp Dependency Injection (DI) framework [reference](https://oatpp.io/api/latest/oatpp/core/macro/component/).\n\nThe code structure of the examples with `_COMPONENT` macros is often unclear to new users and a bit obscure about setting up the server and connection handlers using oatpp.\nThis repo contains refectored c++ examples of server and client without using dependency injection framework macros components.\n\n![](./misc/server_client_example.gif)\n\n### Dependencies Installation\n\n#### [oatpp release 1.3.0](https://github.com/oatpp/oatpp/releases/tag/1.3.0)\n\n```\ngit clone https://github.com/oatpp/oatpp\ncd oatpp\ngit checkout tags/1.3.0\nmkdir build \u0026\u0026 cd build\ncmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=\u003cpath-to-oatpp\u003e/build/install\nmake all\nmake install\n```\n\n#### [oatpp-websocket release 1.3.0](https://github.com/oatpp/oatpp-websocket/releases/tag/1.3.0)\n\n```\ngit clone https://github.com/oatpp/oatpp-websocket\ncd oatpp-websocket\ngit checkout tags/1.3.0\nmkdir build \u0026\u0026 cd build\ncmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=\u003cpath-to-oatpp-websocket\u003e/build/install -Doatpp_DIR=\u003cpath-to-oatpp\u003e/build/install/lib/cmake/oatpp-1.3.0/\nmake all\nmake install\n```\n\n### Building\n\n```\ngit clone https://github.com/yeshasvitirupachuri/oatpp-websocket-server-client-example\ncd oatpp-websocket-server-client-example\nmkdir build \u0026\u0026 cd build\ncmake .. -DCMAKE_BUILD_TYPE=Release -Doatpp_DIR=\u003cpath-to-oatpp\u003e/build/install/lib/cmake/oatpp-1.3.0/ -Doatpp-websocket_DIR=\u003cpath-to-oatpp-websocket\u003e/build/install/lib/cmake/oatpp-websocket-1.3.0/\nmake all\n```\n\n#### Running Server \u0026 Client\n\n- Open a new terminal and go to the repo root directory\n\n##### Server\n\n`./build/server/oatpp-websocket-server-exe`\n\n- The server status can be checked by opening the following address in a web browser\n\n`http://localhost:8000/`\n\n![](./misc/server_root.png)\n\n\n##### Client\n\n- The client application needs an extra argument that is taken as the client name. In a new terminal run the client executable\n\n`./build/client/oatpp-websocket-client-exe Client#1`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeshasvitirupachuri%2Foatpp-websocket-server-client-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeshasvitirupachuri%2Foatpp-websocket-server-client-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeshasvitirupachuri%2Foatpp-websocket-server-client-example/lists"}