finds.dev

fanux/lhttp

go websocket, a better way to buid your IM server

View on GitHub

★ 689GoMITupdated Apr 2018

// the take

lhttp is a thin IM/chat protocol layered on top of raw websockets, with a line-based header format modeled on HTTP. It's aimed at Go developers who want to roll their own chat server without pulling in XMPP, and it bundles pub/sub via gnatsd for clustering across multiple lhttp instances.

The protocol itself is a genuinely simple idea done well: HTTP-style headers over a websocket frame means you get a human-readable wire format you can debug with your eyes, and the multipart format using byte offsets instead of boundary strings avoids an O(n) scan of the whole message body. The processor/registration pattern (lhttp.Regist("chat", &ChatProcessor{})) is a clean, minimal plugin model for routing commands to handlers. Clustering via gnatsd for cross-server pub/sub is a reasonable, proven building block rather than something homegrown.

Dead project: last commit is from April 2018, no Go modules (still using Godeps/vendor), so it won't drop into a modern Go toolchain without manual dependency surgery. There's no auth, encryption, or backpressure handling visible in the README — anyone exposing /echo directly to the internet is on their own for rate limiting and abuse. The README is also riddled with typos and broken English in places ("Discribe", "regist", "witch"), which is a weak signal on overall code polish, and there are no tests beyond a couple of _test.go files with no CI badge showing they actually run. The custom LHTTP protocol is non-standard, so you lose interop with any existing websocket tooling or libraries that expect plain JSON-over-WS.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
689
Forks
138
Language
Go
License
MIT
Last commit
8 Apr 2018

// nearby

If lhttp isn't quite it.

All repos →