A simple toy telnet chat server built in 5 hours
>=1.11
git clone https://github.com/jaredfolkins/tinychat
$ ./run.sh
Set the log file location
export TCLog="./"
Set the port
export TCPort="8091"
Set the host
export TCHost="localhost"
See examples in run.sh
telnet localhost 8091
--|Help|-----------------------------------------------------------------------------------------
{no flag needed}
send a message to the room you are in
(example: hi freeze, i'm batman)
/help
prints this banner
(example: /help)
/quit
quits the application
(example: /quit)
/nick
sets your nickname
(example: /nick batman)
/room
change chat room, only 1 room may be joined
(example: /room gotham)
/blast
blast a message to all connected clients
(example: /blast the ice man cometh)
-------------------------------------------------------------------------------------------------
- Connect a client to the server
- Send a message to the server
- The server relays messages to all connected clients, including a timestamp and name of the client sending the message
- Log messages to a file
- Read in config from a config file for port, IP, and log file location
- Support multiple channels or rooms
- Support changing clients changing their names
- An HTTP API to post messages
- An HTTP API to query for messages
coverage: 28.3% of statements