🎶 Minimalist websocket framework for Go.
Melody is websocket framework based on github.com/gorilla/websocket that abstracts away the tedious parts of handling websockets. It gets out of your way so you can write real-time apps. Features include:
- Clear and easy interface similar to
net/http
or Gin. - A simple way to broadcast to all or selected connected sessions.
- Message buffers making concurrent writing safe.
- Automatic handling of sending ping/pong heartbeats that timeout broken sessions.
- Store data on sessions.
go get github.com/openim-sigs/oimws
An encapsulated framework within jssdk
connecting to openim-sdk-core
, providing streamlined management and integration of WebSocket, TCP, and HTTP protocols in the OpenIM ecosystem.
- Protocol Management: Seamless management and integration of WebSocket, TCP, and HTTP protocols.
- Encoding and Decoding: Handle message encoding and decoding for cross-language compatibility.
- Protocol Implementation: Implement basic OpenIM protocols like login, push, etc.
- Event Handling: Convert received messages into corresponding events and pass them to upper layer applications for processing.
Clone the repository to your local machine:
git clone https://github.com/openim-sigs/oimws.git
cd oimws
Import the necessary modules and initialize the protocol framework:
go
Feel free to contribute to this project by opening issues or submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.