feat: adding header support for client

This commit is contained in:
2025-11-21 20:01:49 +07:00
parent 4fc0c438c8
commit 9816426780
3 changed files with 55 additions and 69 deletions

View File

@@ -17,7 +17,7 @@ func main() {
s, err := server.NewSafeWebsocketServerBuilder().
BaseHost("localhost").
BasePort(8080).
ApiKey("").
ApiKey("abcd").
HandleFuncWebsocket("/ws/test/", "data_1", func(c chan []byte) {
ticker := time.NewTicker(10 * time.Millisecond)
for range ticker.C {