kataras/neffos — 628★ on GitHub (Go). A modern, fast and scalable websocket framework with elegant API written in Go
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Neffos is a cross-platform real-time framework with an expressive, elegant API written in Go. Neffos eases common tasks needed in real-time backend and frontend applications, such as:
Scale-out using redis or nats*, with StackExchangeCloser to release it on shutdown and NSConn.Broadcast for a same-server send
Adaptive request upgradation and server dialing
Three backends: gorilla, gobwas, coder
Acknowledgements
Namespaces
Rooms
Broadcast
Event-Driven architecture
Request-Response architecture
Error Awareness
Asynchronous Broadcast
Heartbeat, close status codes and a message size limit
Graceful shutdown
Timeouts
Encoding
Reconnection (neffos.js)
Modern neffos API client for Browsers, Node.js* and Go
Installation
Go 1.27 or later is required.
go get github.com/kataras/neffos@latest
API outline
One Conn per websocket, one NSConn per namespace it connects to, one Room per room it joins. Server and client sides share the same types and methods.
import (
// [...]
"github.com/kataras/neffos"
"github.com/kataras/neffos/gorilla"
)
func runServer() {
events := make(neffos.Namespaces)
events.On("/v1", "workday", func(ns *neffos.NSConn, msg neffos.Message) error {
date := string(msg.Body)
t, err := time.Parse("01-02-2006", date)
if err != nil {
// Return the parse error back to the client.
return err
}
if t.Weekday() == time.Saturday || t.Weekday() == time.Sunday {
// Fire the "notify" client event instead of replying.
return ns.Send("notify", []byte("day off"))
}
// Reply back to the client.
responseText := fmt.Sprintf("it is %s, do your job.", t.Weekday())
return neffos.Reply([]byte(responseText))
})
// WithTimeout adds a read timeout and a heartbeat on top of the namespaces.
websocketServer := neffos.New(gorilla.DefaultUpgrader, neffos.WithTimeout{
ReadTimeout: 60 * time.Second,
PingInterval: 20 * time.Second,
Namespaces: events,
})
router := http.NewServeMux()
router.Handle("/", websocketServer)
log.Println("Serving websockets on localhost:8080")
log.Fatal(http.ListenAndServe(":8080", router))
}
Go Client
func runClient() {
ctx := context.TODO()
events := make(neffos.Namespaces)
events.On("/v1", "notify", func(c *neffos.NSConn, msg neffos.Message) error {
log.Printf("Server says: %s\n", string(msg.Body))
return nil
})
// Connect to the server.
client, err := neffos.Dial(ctx,
gorilla.DefaultDialer,
"ws://localhost:8080",
events)
if err != nil {
panic(err)
}
// Connect to a namespace.
c, err := client.Connect(ctx, "/v1")
if err != nil {
panic(err)
}
fmt.Println("Please specify a date of format: mm-dd-yyyy")
for {
fmt.Print(">> ")
var date string
fmt.Scanf("%s", &date)
// Send to the server and wait for a reply to this message.
response, err := c.Ask(ctx, "workday", []byte(date))
if err != nil {
if neffos.IsCloseError(err) {
// Check if the error is a close signal,
// or make use of the `<- client.NotifyClose`
// read-only channel instead.
break
}
// >> 13-29-2019
// error received: parsing time "13-29-2019": month out of range
fmt.Printf("error received: %v\n", err)
continue
}
// >> 06-29-2019
// it is a day off!
//
// >> 06-24-2019
// it is Monday, do your job.
fmt.Println(string(response.Body))
}
}
The wiki covers every feature with a page of its own, from the first echo server to scaling out over Redis or NATS.
For detailed technical documentation, head over to pkg.go.dev. For executable code, visit the _examples directory.
What's new
See HISTORY.md for the full changelog. If you are upgrading from v0.0.24 or earlier, read the migration guide on the wiki: Migrating-to-v0.0.25.
Contributing
We'd love to see your contribution to the neffos real-time framework! For more information about contributing to the neffos project please check the CONTRIBUTING.md file.
neffos-contrib github organisation for more programming languages support, please invite yourself.
Security Vulnerabilities
If you discover a security vulnerability within neffos, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.
License
The word "neffos" has a greek origin and it is translated to "cloud" in English dictionary.
The most recent commit recorded on kataras/neffos was 16 days ago, based on the GitHub push timestamp. The repository has 52 forks — one of the better signals of community interest.
How many stars does kataras/neffos have?
kataras/neffos has 628 GitHub stars — refresh the page for the live number, or check github.com/kataras/neffos. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is kataras/neffos written in?
kataras/neffos is written primarily in Go. GitHub's language field is based on the largest share of bytes in the default branch.
What license does kataras/neffos use?
kataras/neffos is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is kataras/neffos associated with?
GitHub's repository topics for kataras/neffos: "go", "golang", "iris", "neffos", "websocket". TopGit's editorial category is Backend.
Where can I see kataras/neffos in action?
The project maintains a homepage at https://github.com/kataras/neffos/wiki. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about kataras/neffos?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/kataras/neffos is the definitive source.
Read full README in the tab above.
Curious whether neffos is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about neffos.