{"id":37157512,"url":"https://github.com/fardinak/websocket","last_synced_at":"2026-01-14T18:47:38.126Z","repository":{"id":51045651,"uuid":"370363081","full_name":"Fardinak/websocket","owner":"Fardinak","description":"An opinionated WebSocket Server in Golang","archived":false,"fork":false,"pushed_at":"2021-05-25T17:36:20.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T12:16:00.303Z","etag":null,"topics":["golang","golang-module","websocket","websocket-server"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/Fardinak/websocket","language":"Go","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/Fardinak.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}},"created_at":"2021-05-24T13:32:03.000Z","updated_at":"2021-05-25T17:10:01.000Z","dependencies_parsed_at":"2022-08-31T15:40:18.779Z","dependency_job_id":null,"html_url":"https://github.com/Fardinak/websocket","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Fardinak/websocket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fardinak%2Fwebsocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fardinak%2Fwebsocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fardinak%2Fwebsocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fardinak%2Fwebsocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fardinak","download_url":"https://codeload.github.com/Fardinak/websocket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fardinak%2Fwebsocket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28430905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["golang","golang-module","websocket","websocket-server"],"created_at":"2026-01-14T18:47:37.322Z","updated_at":"2026-01-14T18:47:38.117Z","avatar_url":"https://github.com/Fardinak.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebSocket\n[![GitHub license](https://img.shields.io/github/license/Fardinak/websocket?style=flat-square)](https://github.com/Fardinak/websocket/blob/master/LICENSE)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/Fardinak/websocket?style=flat-square)\n![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/Fardinak/websocket?include_prereleases\u0026sort=semver\u0026style=flat-square)\n[![Go Reference](https://pkg.go.dev/badge/github.com/Fardinak/websocket.svg)](https://pkg.go.dev/github.com/Fardinak/websocket)\n\nA WebSocket Server with Subprotocol support.\n\n## Features\n### Socket handling\nWe use goroutines + channels to read from and write to a WebSocket.\nPING/PONG messages are also handled internally.\n\n### Subprotocol registry\nAn API is provided to create subprotocols and register messages to them.\n\n### Message encoding\nMessage names (topics) are strings with a maximum length of 225 bytes, and the payload is a byte array. You can use any\nencoder/decoder you like as long as you can decode/encode it at the client.\n\n### Socket management\nSocket operations are handled internally with sane defaults. There is an optional `ClientID` function that will run on\neach new connection, allowing you to group sockets by user ID or any other identifier.\n\n### Rooms\nYou can further group clients into rooms \n\n## TODO\n- [ ] Unit tests\n- [ ] JS-Client implementation\n- [ ] Client implementation\n- [ ] More configurability\n- [ ] Default subprotocol\n- [ ] Logging interface instead of `logrus.Entry`\n- [ ] More comments\n- [ ] JSONSubprotocol: a subprotocol that works with `interface{}` instead of `[]byte` and encodes to/decodes from JSON\n\n## Credit\nThis library is a wrapper around the `gorilla/websocket` implementation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffardinak%2Fwebsocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffardinak%2Fwebsocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffardinak%2Fwebsocket/lists"}