{"id":16388742,"url":"https://github.com/timostamm/aspnetcore-websocket-controller","last_synced_at":"2026-06-04T16:31:30.075Z","repository":{"id":66186601,"uuid":"218589166","full_name":"timostamm/aspnetcore-websocket-controller","owner":"timostamm","description":"Easy WebSockets for AspNetCore 3.0","archived":false,"fork":false,"pushed_at":"2019-12-04T20:41:30.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-31T07:16:14.993Z","etag":null,"topics":["aspnetcore3","websocket"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timostamm.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":"2019-10-30T17:53:10.000Z","updated_at":"2022-06-07T19:33:19.000Z","dependencies_parsed_at":"2023-02-21T17:00:23.949Z","dependency_job_id":null,"html_url":"https://github.com/timostamm/aspnetcore-websocket-controller","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/timostamm/aspnetcore-websocket-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timostamm%2Faspnetcore-websocket-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timostamm%2Faspnetcore-websocket-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timostamm%2Faspnetcore-websocket-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timostamm%2Faspnetcore-websocket-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timostamm","download_url":"https://codeload.github.com/timostamm/aspnetcore-websocket-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timostamm%2Faspnetcore-websocket-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33914543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"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":["aspnetcore3","websocket"],"created_at":"2024-10-11T04:29:48.064Z","updated_at":"2026-06-04T16:31:30.046Z","avatar_url":"https://github.com/timostamm.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"aspnetcore-websocket-controller\n===============================\n\nEasy WebSockets for AspNetCore 3.0.\n\n\nRun `dotnet add package TimoStamm.WebSockets.Controller` to install.\n\nImplement your websocket controller:\n````c#\npublic class MyController : AWebsocketController\n{\n    public override async Task OnOpen(Client client)\n    {\n        await client.SendAsync(\"Hello there\");\n    }\n    // OnTextMessage(Client client, string text)\n    // OnBinaryMessage(...)\n    // OnClose(...)\n}\n````\n\nAnd add it in your `Startup.cs`\n````c#\npublic void Configure(IApplicationBuilder app, IWebHostEnvironment env)\n{\n    app.UseWebSockets();\n    var myHandler = WebSocketHandler.CreateFor\u003cMyController\u003e(app.ApplicationServices);\n    app.Run(myHandler.HandleRequest);\n}\n````\n\nSee example for a basic websocket chat. To run, `cd example` and `dotnet run`, then open http://localhost:5000/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimostamm%2Faspnetcore-websocket-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimostamm%2Faspnetcore-websocket-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimostamm%2Faspnetcore-websocket-controller/lists"}