{"id":16707383,"url":"https://github.com/xiaodaigh/wsumm","last_synced_at":"2025-09-07T23:41:15.041Z","repository":{"id":73048653,"uuid":"100157909","full_name":"xiaodaigh/wsumm","owner":"xiaodaigh","description":"A set of Write-functions to make gorilla/websocket's write to connection be blocking if another Write-function was using the connection","archived":false,"fork":false,"pushed_at":"2017-08-14T03:15:33.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T10:08:25.504Z","etag":null,"topics":["go","gorilla","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","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/xiaodaigh.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}},"created_at":"2017-08-13T06:17:24.000Z","updated_at":"2019-01-12T08:59:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"504a0b40-10a9-42fb-b91d-6ff861af8276","html_url":"https://github.com/xiaodaigh/wsumm","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/xiaodaigh%2Fwsumm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaodaigh%2Fwsumm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaodaigh%2Fwsumm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaodaigh%2Fwsumm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaodaigh","download_url":"https://codeload.github.com/xiaodaigh/wsumm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243613147,"owners_count":20319474,"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":["go","gorilla","websocket"],"created_at":"2024-10-12T19:39:13.064Z","updated_at":"2025-03-14T16:39:09.304Z","avatar_url":"https://github.com/xiaodaigh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":" # wsumm\n \nWrapper functions to make gorilla/websocket's Write*Functions* i.e. WriteMessage and WriteJSON be blocking if another Write*function* of the same channel is being run.\n\n# Installation\nIn command line\n\n```\ngo get github.com/xiaodaigh/wsumm\n```\n\n# Example Usage\n```go\npackage test_wsumm\n\nimport (\n\t\"github.com/gorilla/websocket\"\n\t\"github.com/xiaodaigh/wsumm\"\n\t\"net/http\"\n)\n\nvar upgrader = wsumm.Upgrader{\n\tUpgrader: \u0026websocket.Upgrader{\n\t\tReadBufferSize:  1024,\n\t\tWriteBufferSize: 1024,\n\t}}\n\nfunc someHandler(w http.ResponseWriter, r *http.Request) {\n\tconn, _ := upgrader.Upgrade(w, r, nil)\n\tgo func() {\n\t\tfor i := 0; i \u003c 1000; i++ {\n\t\t\tconn.WriteMessage(websocket.TextMessage, []byte(\"testing\"))\n\t\t}\n\t}()\n\tgo func() {\n\t\tfor i := 0; i \u003c 1000; i++ {\n\t\t\tconn.WriteJSON(struct{}{})\n\t\t}\n\t}()\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaodaigh%2Fwsumm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaodaigh%2Fwsumm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaodaigh%2Fwsumm/lists"}