Go example server for a LOCO-style local chat backend.
This is intentionally small and dependency-free:
- TCP server on
127.0.0.1:5050 - HTTP diagnostics on
127.0.0.1:8080 - LOCO-style frame:
4B id2B status11B method1B type4B body lengthBSON body
cd local-chat-backend
go run ./cmd/local-chat-backendInvoke-RestMethod http://127.0.0.1:8080/healthz
Invoke-RestMethod http://127.0.0.1:8080/sessionsChat messages do not go through HTTP. A client sends a TCP WRITE packet, then the server responds to that request and broadcasts a TCP MSG push packet to connected sessions.
PINGCHECKINLOGINLISTLCHATLISTCHATINFOCHATONROOMWRITE
This sample reads and writes the plain LOCO packet structure. It does not implement the Kakao V2SL RSA/AES-GCM handshake.
For a real private local server, change the client to either:
- use plain local TCP while testing, or
- use your own RSA public key in the client and implement the matching V2SL handshake in this server with your private key.