{"id":26540468,"url":"https://github.com/mccutchen/websocket","last_synced_at":"2026-05-17T08:37:30.983Z","repository":{"id":264953785,"uuid":"894742573","full_name":"mccutchen/websocket","owner":"mccutchen","description":"A zero-dependency Golang implementation of the websocket protocol (RFC 6455)","archived":false,"fork":false,"pushed_at":"2025-02-20T04:56:25.000Z","size":155,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T05:29:58.215Z","etag":null,"topics":["golang","websocket","websocket-server"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/mccutchen/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/mccutchen.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":"2024-11-26T22:51:28.000Z","updated_at":"2025-02-19T04:09:58.000Z","dependencies_parsed_at":"2024-12-27T20:26:52.854Z","dependency_job_id":"37082c9c-2991-4992-91ed-ce8112a03347","html_url":"https://github.com/mccutchen/websocket","commit_stats":null,"previous_names":["mccutchen/websocket"],"tags_count":2,"template":false,"template_full_name":"mccutchen/go-pkg-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mccutchen%2Fwebsocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mccutchen%2Fwebsocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mccutchen%2Fwebsocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mccutchen%2Fwebsocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mccutchen","download_url":"https://codeload.github.com/mccutchen/websocket/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244890102,"owners_count":20527030,"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":["golang","websocket","websocket-server"],"created_at":"2025-03-22T00:33:35.081Z","updated_at":"2026-05-17T08:37:25.956Z","avatar_url":"https://github.com/mccutchen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# websocket\n\n[![Documentation](https://pkg.go.dev/badge/github.com/mccutchen/websocket)](https://pkg.go.dev/github.com/mccutchen/websocket)\n[![Build status](https://github.com/mccutchen/websocket/actions/workflows/test.yaml/badge.svg)](https://github.com/mccutchen/websocket/actions/workflows/test.yaml)\n[![Code coverage](https://codecov.io/gh/mccutchen/websocket/branch/main/graph/badge.svg)](https://codecov.io/gh/mccutchen/websocket)\n[![Go report card](http://goreportcard.com/badge/github.com/mccutchen/websocket)](https://goreportcard.com/report/github.com/mccutchen/websocket)\n\nA zero-dependency Golang implementation of the websocket protocol ([RFC 6455][rfc]),\noriginally extracted from [mccutchen/go-httpbin][].\n\n\u003e [!WARNING]\n\u003e **Not production ready!**\n\n**Do not use this library in a production application.** It is not\nparticularly optimized and many breaking API changes are likely for the\nforseeable future.\n\nConsider one of these libraries instead:\n- https://github.com/coder/websocket\n- https://github.com/gobwas/ws\n- https://github.com/lxzan/gws\n\n## Usage\n\nFor now, see\n- [Go package docs][pkgdocs] on pkg.go.dev\n- Example servers in the [examples](/examples) dir\n\nMore useful usage and example docs TK.\n\n## Testing\n\n### Unit tests\n\nThis project's unit tests are relatively quick to run and provide decent\ncoverage of the implementation:\n\n```bash\nmake test\n```\n\nOr generate code coverage:\n\n```bash\nmake testcover\n```\n\n### Autobahn integration tests\n\nThe [crossbario/autobahn-testsuite][autobahn] project's \"fuzzing client\" is\nalso used for integration/conformance/fuzz testing.\n\n\u003e [!NOTE]\n\u003e The most recent Autobahn test reports may be viewed at https://mccutchen.github.io/websocket/\n\nBecause these tests a) require docker and b) take 40-60s to run, they are\ndisabled by default.\n\nTo run the autobahn fuzzing client in its default configuration, use:\n\n```bash\nmake testautobahn\n```\n\nThere are a variety of options that can be enabled individually or together,\nwhich are useful for viewing the generated HTML test report, narrowing the\nset of test cases to debug a particular issue, or to enable more detailed\ndebug logging.\n\n- `AUTOBAHN=1` is required to enable the Autobahn fuzzing client test suite,\n  set automatically by the `make testautobahn` target.\n\n- `CASES` narrows the set of test cases to execute (note the wildcards):\n\n  ```bash\n  make testautobahn CASES='5.7,6.12.*,9.*'\n  ```\n\n- `REPORT_DIR={path}` specifies the output dir for autobahn test results\n  (defaults to `.ingegrationtests/autobahn-test-${timestamp}`)\n\n- `REPORT=1` automatically opens the resulting HTML test resport:\n\n  ```bash\n  make testautobahn REPORT=1\n  ```\n\n- `TARGET={url}` runs autobanh against an external server instead of an\n  ephemeral [httptest][] server, which can be useful for, e.g.,\n  capturing [pprof][] info or running [tcpdump][]:\n\n  ```bash\n  make testautobahn TARGET=http://localhost:8080/\n  ```\n\n- `DEBUG=1` enables fairly detailed debug logging via the server's built-in\n  websocket lifecycle hooks:\n\n  ```bash\n  make testautobahn DEBUG=1\n  ```\n\nPutting it all together, a command like this might be used to debug a\na particular failing test case:\n\n```bash\nmake testautobahn DEBUG=1 CASES=9.1.6 REPORT=1\n```\n\n## Benchmarks\n\n🚧 _Accurate, useful benchmarks are very much a work in progress._ 🚧\n\n### Go benchmarks\n\nStandard Go benchmarks may be run like so:\n\n```bash\nmake bench\n```\n\n### nstd/webocket-benchmarks\n\nBasic, manual support for running the [ntsd/websocket-benchmarks][ntsd] suite\nof benchmarks is documented in the [examples/benchserver][benchserver] dir.\n\n[autobahn]: https://github.com/crossbario/autobahn-testsuite\n[benchserver]: /examples/benchserver/README.md\n[httptest]: https://pkg.go.dev/net/http/httptest\n[mccutchen/go-httpbin]: https://github.com/mccutchen/go-httpbin\n[ntsd]: https://github.com/ntsd/websocket-benchmark\n[pkgdocs]: https://pkg.go.dev/github.com/mccutchen/websocket\n[pprof]: https://pkg.go.dev/runtime/pprof\n[rfc]: https://datatracker.ietf.org/doc/html/rfc6455\n[tcpdump]: https://www.tcpdump.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmccutchen%2Fwebsocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmccutchen%2Fwebsocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmccutchen%2Fwebsocket/lists"}