The decentralized auto-discovery lan chat client.
Go to file
Brandon Hartshorn ff261bb68b Add message receipt info to readme 2019-04-05 11:12:45 -06:00
.gitignore Initial commit 2019-03-20 12:17:27 -05:00
LICENSE Initial commit 2019-03-20 12:17:27 -05:00 Add message receipt info to readme 2019-04-05 11:12:45 -06:00 Clean up, expound readme for submission 2019-04-05 10:57:30 -06:00



LanChat is a simple decentralized chat client. It does not require a server for discovery of other chat users. Instead, each client periodically sends out a broadcast packet announcing it's presence on the network. Each client keeps a list of other clients.

Note this can only function on a single subnet, and only if UDP broadcast packets can travel freely between individual clients on the network.


LanChat requires only Python 3, and uses only system libraries. Tested on Python 3.7.2.

Start the client using: ./ <username>

A simple command line interface is shown. Other known clients will be displayed with an index under the "Send to:" header on the terminal output. Upon first startup, the client most likely won't know about other clients, because it learns about them only as it receives broadcast packets from them. Submitting r as input to the prompt will refresh the interface so you can check for other users.

Once another user is found and displayed, simple enter the number associated with that user, and the program will prompt for the message to send to that user. Type the message to be sent, and hit enter. The message will be sent asynchronously by a separate thread after polling for received messages, so the message may take a moment to arrive to the other client.

Messages from other clients are received asynchronously, but not displayed asynchronously to avoid mangling the prompt upon receipt. In order to show new messages, submit r at the prompt. Messages will be displayed above the prompt options.