/whistle

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป TCP chatting in GoLang

Primary LanguageGo

Whistle ๐ŸŒฌ

A simple TCP chat room written in GoLang. This application allows clients to connect to port 8001, create a username or be โœจanonymousโœจ, and start joining rooms to send a message.

image

Demo ๐ŸŽฏ

 2022-05-30 at 11 59 30 PM

Here is an example of two clients connected via TCP on Whistle. They were able to create nicknames and join a room to chat with each other. When done chatting, they were able to quit out of the server.

Usage ๐Ÿš€

1. Clone the Repository

$ git clone https://github.com/allen-tran/whistle/

2. Run the App

$ ./whistle

3. Connect the Client

MacOS

$ nc ::1 8001

Linux

$ telnet localhost 8001

Commands ๐ŸŽฎ

  • /nick <name>: give yourself a nickname, else stay anonymous
  • /join <name>: join a room. if the room does not exist, it will be created for you
  • /rooms: show list of availible rooms
  • /msg <message>: broadcast message to everyone in room
  • /quit: disconnects from chat server