An open API service indexing awesome lists of open source software.

https://github.com/colevoss/gosock

Golang Websocket Framework
https://github.com/colevoss/gosock

Last synced: about 1 year ago
JSON representation

Golang Websocket Framework

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