File: readme.md

package info (click to toggle)
golang-github-centrifugal-centrifuge 0.15.0%2Bgit20210306.f435ba2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,612 kB
  • sloc: javascript: 102; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 618 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
Example demonstrates a simple chat with custom WebSocket transport based on https://github.com/gobwas/ws library. You can expect a much less memory usage when handling lots of connections compared to default Gorilla Websocket based transport (about 3x reduction).

To start example run the following command from example directory:

```
go run main.go
```

Then go to http://localhost:8000 to see it in action.

Note that since this example uses `epoll` on Linux and `kqueue` on BSD-based systems you should be very careful with relying on this code for your production application. **Think wise and carefully test**.