Skip to content

lightweight websocket broadcast server

License

Notifications You must be signed in to change notification settings

a-wing/lightcable

Repository files navigation

lightcable

lightweight websocket channel server

Go Reference Build Status codecov Go Report Card license GitHub release

Compile

  • golang >= 1.13

Application scenario

  • A simple Websocket broadcast room
  • WebRTC signaling server
  • Replace socket.io (Special case: client only join a room)
  • Wx APP sdk and webview communication (WeChat Mini Program and Webview communication)

As a Application

docker run -p 8080:8080 ghcr.io/a-wing/lightcable

install && run

go install github.com/a-wing/lightcable/cmd/lightcable@latest

# Listen port: 8088
lightcable -l localhost:8088

URL

ws://localhost:8080/{room}

broadcast server demo

Server

lightcable

Room: xxx

websocat --linemode-strip-newlines 'ws://localhost:8080/xxx'

Room: xxx

websocat --linemode-strip-newlines 'ws://localhost:8080/xxx'

Room: xxx-2

websocat --linemode-strip-newlines 'ws://localhost:8080/xxx-2'