Protocol::WebSocket
Provides a low-level implementation of the WebSocket protocol according to RFC6455. It only implements the latest stable version (13).
Usage
Please browse the source code index or refer to the guides below.
Getting Started
This guide explains how to use protocol-websocket for implementing a websocket client and server.
Extensions
This guide explains how to use protocol-websocket for implementing a websocket client and server using extensions.
Releases
Please browse the releases for more details.
v0.21.0
- All frame reading and writing logic has been consolidated into
Framerto improve performance.
v0.20.2
- Fix error messages for
Frameto be more descriptive.
v0.20.1
- Revert masking enforcement option introduced in v0.20.0 due to compatibility issues.
v0.20.0
- Introduce option
requires_maskingtoFramerfor enforcing masking on received frames.
v0.19.1
- Ensure ping reply payload is packed correctly.
v0.19.0
- Default to empty string for message buffer when no data is provided.
v0.18.0
- Add
PingMessagealongsideTextMessageandBinaryMessagefor a consistent message interface. - Remove
JSONMessage(use application-level encoding instead).
v0.17.0
- Introduce
#close_writeand#shutdownmethods onConnectionfor more precise connection lifecycle control.
v0.16.0
- Move
#sendlogic intoMessagefor better encapsulation. - Improve error handling when a
nilmessage is passed.
v0.15.0
- Require
Messageclass by default.
Contributing
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.
Running Tests
To run the test suite:
bundle exec sus
Making Releases
To make a new release:
bundle exec bake gem:release:patch # or minor or major
Developer Certificate of Origin
In 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.
Community Guidelines
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.