https://github.com/colevoss/gosock
Golang Websocket Framework
https://github.com/colevoss/gosock
Last synced: about 1 year ago
JSON representation
Golang Websocket Framework
- Host: GitHub
- URL: https://github.com/colevoss/gosock
- Owner: colevoss
- Created: 2023-09-14T19:28:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-03T21:13:33.000Z (over 2 years ago)
- Last Synced: 2025-02-14T04:18:05.808Z (over 1 year ago)
- Language: Go
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gosock
Gosock is a channel based Websocket library built on top of [gobwas](https://github.com/gobwas/ws).
This project is in its early stages and not production ready.
## Usage
See [Example](./examples/test/main.go)
## Incoming Message
Incoming messages should be shaped like so:
```json
{
"channel": "channel.123.chat",
"event": "event-name",
"payload": {
"hello": "param"
}
}
```
Outgoing messages are shaped the same way.
## Todo
- [x] Fix channel names with ending params `channel.{id}`
- [ ] Add more configuration for servers
- [x] Close channel when last connection leaves
- [ ] Figure out Producer based broadcast/emit
- [ ] Recover from panics in pool