Provides a low-level implementation of the WebSocket protocol according to RFC6455. It only implements the latest stable version (13).
Please see the project documentation for more details.
-
Getting Started - This guide explains how to use
protocol-websocketfor implementing a websocket client and server. -
Extensions - This guide explains how to use
protocol-websocketfor implementing a websocket client and server using extensions.
Please see the project releases for all releases.
- All frame reading and writing logic has been consolidated into
Framerto improve performance.
- Fix error messages for
Frameto be more descriptive.
- Revert masking enforcement option introduced in v0.20.0 due to compatibility issues.
- Introduce option
requires_maskingtoFramerfor enforcing masking on received frames.
- Ensure ping reply payload is packed correctly.
- Default to empty string for message buffer when no data is provided.
- Add
PingMessagealongsideTextMessageandBinaryMessagefor a consistent message interface. - Remove
JSONMessage(use application-level encoding instead).
- Introduce
#close_writeand#shutdownmethods onConnectionfor more precise connection lifecycle control.
- Move
#sendlogic intoMessagefor better encapsulation. - Improve error handling when a
nilmessage is passed.
- Require
Messageclass by default.
We welcome contributions to this project.
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature). - Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin my-new-feature). - Create new Pull Request.
To run the test suite:
bundle exec susTo make a new release:
bundle exec bake gem:release:patch # or minor or majorIn order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.