A lightweight WebSocket manager for Go, built with gin-gonic
and gorilla/websocket
. This library provides a robust WebSocket server implementation with features like connection management, message routing, and validation.
- WebSocket Management: Handle multiple WebSocket connections with ease.
- Message Routing: Route messages based on custom protocols.
- Validation: Built-in support for struct validation using
go-playground/validator
. - Heartbeat Detection: Automatically detect and close inactive connections.
- Customizable: Easily extend and customize the library for your needs.
To install the library, use go get
:
go get -u github.com/gin-generator/websocket
You can find usage examples in the example folder.
- Basic WebSocket Server: Demonstrates how to handle WebSocket connections and messages.