lxzan / gws

simple, fast, reliable websocket server & client, supports running over tcp/kcp/unix domain socket. keywords: ws, proxy, chat, go, golang...
https://pkg.go.dev/github.com/lxzan/gws
Apache License 2.0
1.36k stars 87 forks source link

Did you consider prepared messages #45

Closed Bios-Marcel closed 1 year ago

Bios-Marcel commented 1 year ago

Gorilla/websocket supports prepared messagse. Meaning the frames are generated and compressed once and are then reused. (https://github.com/gorilla/websocket/blob/main/prepared.go#L19)

This is particularly useful if you want to send the same payload to multiple connections. If you are open to this, I could also try implementing it.

lxzan commented 1 year ago

Supported. Check out Broadcaster.

Bios-Marcel commented 1 year ago

Oh, cool, didn't see. Thanks 🙏