Show HN: GoSocket – A Simple WebSocket Framework for Go Hi HN, I built GoSocket, a small library that helps you set up WebSocket servers in Go with almost no boilerplate. It lets you start a server in a few lines of code, handle connections, broadcast to rooms or clients, and add middleware. JSON is supported now, Protobuf and MessagePack are planned. Example: ws := gosocket.NewServer() ws.WithPort(8080). WithPath("/ws"). OnMessage(func(c gosocket.Client, m gosocket.Message, ctx *gosocket.HandlerContext) error { c.Send(m.RawData) // echo return nil }) log.Fatal(ws.Start()) Repo: https://ift.tt/euMKI1H It’s still pre-1.0, so I’d love feedback, testing, and contributions. https://ift.tt/euMKI1H September 8, 2025 at 04:00AM
0 Comments