{"id":20791580,"url":"https://github.com/eintim23/switchws","last_synced_at":"2025-10-12T07:38:21.147Z","repository":{"id":170406882,"uuid":"583089843","full_name":"EinTim23/switchws","owner":"EinTim23","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-29T09:40:18.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T00:44:40.518Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EinTim23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-12-28T18:26:42.000Z","updated_at":"2023-03-17T12:08:59.000Z","dependencies_parsed_at":"2024-08-21T03:02:40.862Z","dependency_job_id":null,"html_url":"https://github.com/EinTim23/switchws","commit_stats":null,"previous_names":["eintim23/switchws"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EinTim23/switchws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EinTim23%2Fswitchws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EinTim23%2Fswitchws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EinTim23%2Fswitchws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EinTim23%2Fswitchws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EinTim23","download_url":"https://codeload.github.com/EinTim23/switchws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EinTim23%2Fswitchws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010666,"owners_count":26084784,"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-12T02:00:06.719Z","response_time":53,"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":[],"created_at":"2024-11-17T15:45:40.553Z","updated_at":"2025-10-12T07:38:21.126Z","avatar_url":"https://github.com/EinTim23.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Switch WS\nA websocket client library that targets the nintendo switch. It uses [easywsclient](https://github.com/dhbaird/easywsclient) as reference. \n\n### Known issues\n- The library doesn't verify the SSL certificates which might lead to security issues\n- Only SSL secured websockets are supported(plaintext will be added back later)\n- You currently can't open multiple sockets at once because the mbedtls variables are global (will be fixed once I have time, I did it like that for testing purposes)\n### Example\n\n```cpp\n#include  \u003ciostream\u003e\n#include  \u003cswitchws.hpp\u003e\n\nusing switchws::WebSocket;\nint main(int argc,  char* argv[]) {\n\tconsoleInit(NULL);\n\tpadConfigureInput(1, HidNpadStyleSet_NpadStandard);\n\tPadState pad;\n\tpadInitializeDefault(\u0026pad);\n\tsocketInitializeDefault();\n\tWebSocket::pointer ws = WebSocket::from_url(\"wss://example.com\");\n\tif(ws ==  NULL)\n\t\tgoto exit;\n\tws-\u003esend(\"test\");\n\twhile  (ws-\u003egetReadyState()  != WebSocket::CLOSED \u0026\u0026  appletMainLoop())\n\t{\n\t\tpadUpdate(\u0026pad);\n\t\tu64 kDown =  padGetButtonsDown(\u0026pad);\n\t\tif  (kDown \u0026 HidNpadButton_Plus)\n\t\t\tbreak;\n\t\tws-\u003epoll();\n\t\tws-\u003edispatch([ws](const std::string \u0026 message)  {\n\t\t\tstd::cout \u003c\u003c message \u003c\u003c std::endl;\n\t\t\tconsoleUpdate(NULL);\n\t\t});\n\t\tconsoleUpdate(NULL);\n\t}\nexit:\n\tsocketExit();\n\tconsoleExit(NULL);\n\treturn  0;\n}\n\ndelete ws;\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feintim23%2Fswitchws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feintim23%2Fswitchws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feintim23%2Fswitchws/lists"}