Releases: bminer/ws-server-wrapper-go
Releases · bminer/ws-server-wrapper-go
v1.3.0
-
Defer JSON decoding of message arguments until handler invocation (#3)
Previously
Message.Argumentswas of type[]any, and inbound JSON messages were directly decoded intoArguments, probably asmap[string]anyvalues. Now,Message.Argumentsis of type[]json.RawMessage, which defers JSON decoding for each argument until the handler is invoked. Not only is performance improved in some cases, but now the JSON is decoded directly into the handler parameter types. -
Fixed bugs and linter issues
-
Updated dependency
v1.2.0
v1.1.0
v1.0.0
First stable release!
Features:
- Accept inbound WebSocket connections from any Go WebSocket library (coder/websocket fully supported)
- Named channels per ws-wrapper specification
- Add event handlers to Client or Server
- Add one-time event handlers to Client or Server
- Send events and requests to Clients individual clients
- Broadcast events to all connected clients
- Thread-safe in-memory key/value store for each Client (based on Go maps)
- Intelligent calling of event handlers using reflection; supports
context.Contextas first argument and argument type conversions - Adapter for github.com/coder/websocket library
Example app provided here