/WSChannel

Channel for websocket, broadcast message to others in the same channel.

Primary LanguageGoApache License 2.0Apache-2.0

WSChannel

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.

Channel

  • URI: ws://address:port/ws/<channel>

Clients in the same channel will receive messages of other clients in the same channel.

Dependencies

Run

  • 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.