How ghostoraner/lanchat works
LANChat is a self-hosted LAN messenger: a server accepts TLS-protected, line-delimited JSON connections, while either of two desktop clients supports chat, direct messages, user presence, history, and chunked file transfer. The classic Avalonia client discovers the server over UDP; the README documents the same protocol and discovery model for the Tauri client. The classic client and server workflow is visible in excerpts; Tauri networking and command implementations were not sampled, so their server interaction is documented rather than source-verified.
Main entry points: ChatServer.cs TCP TLS server · ClientConnection.cs Connection protocol · MainViewModel.cs Chat workflow · ChatClient.cs TLS client
Components 15
Server runtime
- Server entry
LANChat.Server/Program.cs - TCP TLS server
LANChat.Server/ChatServer.cs - Connection protocol
LANChat.Server/ClientConnection.cs - Client registry
LANChat.Server/ClientManager.cs - Message model
LANChat.Server/Models/ChatMessage.cs
Avalonia client
- Chat UI
LANChat.Client/MainWindow.axaml.cs - Chat workflow
LANChat.Client/ViewModels/MainViewModel.cs - Message view
LANChat.Client/ViewModels/ChatMessageViewModel.cs - TLS client
LANChat.Client/Services/ChatClient.cs - Message model
LANChat.Client/Models/ChatMessage.cs
Tauri client
- Chat interface
lanchat-tauri/src/main.js - Native backend
lanchat-tauri/src-tauri/src/lib.rs
Other components
- Chat user
- LAN discovery
- Compatible clients
Connections 15
- Chat user → Chat UI: uses
LANChat.Client/MainWindow.axaml.cs - Chat UI → Chat workflow: binds
LANChat.Client/MainWindow.axaml.cs - Chat workflow → Message view: creates views
LANChat.Client/ViewModels/MainViewModel.cs - Chat workflow → TLS client: sends and receives
LANChat.Client/ViewModels/MainViewModel.cs - TLS client → LAN discovery: discovers via UDP
LANChat.Client/Services/ChatClient.cs - TLS client → TCP TLS server: TLS JSON
README.md - Server entry → TCP TLS server: starts
LANChat.Server/Program.cs - TCP TLS server → Connection protocol: dispatches connections
LANChat.Server/ChatServer.cs - Connection protocol → Client registry: manages clients
LANChat.Server/ClientConnection.cs - Connection protocol → Message model: serializes messages
LANChat.Server/ClientConnection.cs - TCP TLS server → LAN discovery: broadcasts UDP
LANChat.Server/ChatServer.cs - Chat user → Chat interface: uses
- Chat interface → Native backend: invokes commands
lanchat-tauri/src/main.js - Native backend → TCP TLS server: TLS JSON
README.md - Compatible clients → TCP TLS server: uses protocol
README.md