Top 7.0% forks on proxy.golang.org
proxy.golang.org : github.com/guillermo/go.reportsockets
Package reportsockets implements a websocket interface where all the clients get the same data. It internally works like a publish/subscribe model where each websocket connection subscribe to a publisher. It implements the http.Handler interface so you can use it with the standard net/http. To use it, you first need to declare the channel or exchange. To tie it to a url, use the standard http. To send messages to all the clients: Other thing that you can do is declare a handler for reciving client messages. If you don't define that method, all the client messages will be ignored. Once you are done, you can close it with Stop. This will close all the websocket connections
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/guillermo/go.reportsockets
License: BSD-1-Clause
Latest release: almost 12 years ago
First release: almost 12 years ago
Namespace: github.com/guillermo
Stars: 1 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 4 months ago