# README
Websocket Wrapper
Write your Websocket message routing like http route handler.
Use the JSON RPC Specification
Usage
Get dependencies
go get github.com/darmawan01/ws-wrapper
Register websocket wrapper handler
engine := gin.Default()
router := engine.Group("/api")
/* Register websocket route */
router.GET("/ws", func(ctx *gin.Context) {
/* Websocket wrapper handler */
ws.WebsocketHandler(ctx.Writer, ctx.Request)
})
Registering your method handler
ws.RegisterChannelHandler("public/health", h.healthCheck)
# Packages
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
Internal error Internal JSON-RPC error.
Parse error Invalid JSON was received by the server An error occurred on the server while parsing the JSON text.
Invalid params Invalid method parameter(s).
Invalid Request The JSON sent is not a valid Request object.
No description provided by the author
Method not found The method does not exist / is not available.
No description provided by the author
No description provided by the author
-32000 to -32099 Server error.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author