A lightweight WebSocket engine 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/websocketYou can find usage examples in the example folder.
- Basic WebSocket Server: Demonstrates how to handle WebSocket connections and messages.
This project is built on the following open-source libraries:
- gin-gonic: A web framework written in Go.
- gorilla/websocket: A Go library for building WebSocket applications.