Channel for websocket, broadcast message to others in the same channel.
This server is just used to redirect and send WebSocket packages without any modification.
- URI:
ws://address:port/ws/<channel>
Clients in the same channel will receive messages of other clients in the same channel.
- Clone this repo and set up GOPATH
$ go get github.com/gorilla/websocket
$ go build -o wschannel main.go hub.go conn.go
$ ./wschannel -addr=<address>:<port>
//wschannel will listen on the port(default 8080) and waiting for connections.