Skip to content

jbesoto/chatroom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chatroom

Build

make

Usage

  1. Run the server:
./server [PORT]

Default port listening is 13000. We will use for explanation purposes.

  1. Use telnet to connect:
telnet localhost 13000
  1. Set name
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
John

The server will record this event:

Client joined the chat: John
  1. Send messages

Now that you have appropriately entered the name, you can send messages via Telnet

  1. Connecting another client

Open another terminal and run steps 2 to 4. Upon connecting, the first client should get notified about this event.

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
John

=== Jane has joined the chat ===
  1. Disconnect client

To close telnet connection, run Ctrl + ]. This will open Telnet's command prompt. Type quit.

telnet> quit

The event will get logged in the server and a message will be broadcasted to other clients.

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Jane

=== John has left the chat ===

About

Simple chatroom developed in C.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published