mirror of https://github.com/gorilla/websocket.git
6f5d2139f4
<!-- For Work In Progress Pull Requests, please use the Draft PR feature, see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. For a timely review/response, please avoid force-pushing additional commits if your PR already received reviews or comments. Before submitting a Pull Request, please ensure that you have: - 📖 Read the Contributing guide: https://github.com/gorilla/.github/blob/main/CONTRIBUTING.md - 📖 Read the Code of Conduct: https://github.com/gorilla/.github/blob/main/CODE_OF_CONDUCT.md - Provide tests for your changes. - Use descriptive commit messages. - Comment your code where appropriate. - Squash your commits - Update any related documentation. - Add gorilla/pull-request-reviewers as a Reviewer --> ## What type of PR is this? (check all applicable) - [ ] Refactor - [ ] Feature - [x] Bug Fix - [ ] Optimization - [ ] Documentation Update - [ ] Go Version Update - [ ] Dependency Update ## Description Noticed a change in default close handler from 1.5.0 to 1.5.1 1.5.1 Now returns the error from `WriteControl` with `CloseMessage` type. However this results in ErrCloseSent returned if the connection initiated the close handshake. This is normally correct as the connection should not be able to write after a close handshake is initiated, except when calling the close handler. in that case nil should be returned so that `advanceFrame()` can return the actual close message. ## Related Tickets & Documents ## Added/updated tests? - [x] Yes - [ ] No, and this is why: _please replace this line with details on why tests have not been included_ - [ ] I need help with writing tests ## Run verifications and test - [ ] `make verify` is passing (fails with `GO-2023-2186 Incorrect detection of reserved device names on Windows in path/filepath` that is unrelated to this change) - [x] `make test` is passing Co-authored-by: Corey Daley <cdaley@redhat.com> |
||
---|---|---|
.github/workflows | ||
examples | ||
vendor | ||
.editorconfig | ||
.gitignore | ||
.golangci.yml | ||
LICENSE | ||
Makefile | ||
README.md | ||
client.go | ||
client_server_test.go | ||
client_test.go | ||
compression.go | ||
compression_test.go | ||
conn.go | ||
conn_broadcast_test.go | ||
conn_test.go | ||
doc.go | ||
example_test.go | ||
go.mod | ||
go.sum | ||
join.go | ||
join_test.go | ||
json.go | ||
json_test.go | ||
mask.go | ||
mask_safe.go | ||
mask_test.go | ||
prepared.go | ||
prepared_test.go | ||
proxy.go | ||
server.go | ||
server_test.go | ||
tls_handshake.go | ||
util.go | ||
util_test.go |
README.md
gorilla/websocket
Gorilla WebSocket is a Go implementation of the WebSocket protocol.
Documentation
- API Reference
- Chat example
- Command example
- Client and server example
- File watch example
- Write buffer pool example
Status
The Gorilla WebSocket package provides a complete and tested implementation of the WebSocket protocol. The package API is stable.
Installation
go get github.com/gorilla/websocket
Protocol Compliance
The Gorilla WebSocket package passes the server tests in the Autobahn Test Suite using the application in the examples/autobahn subdirectory.