Title: Client-Server Live Chat Service
Author: Andrea Covre
Email: andrea.covre@icloud.com
Date: March 10th, 2021
This service was realized as a socket programming and networking exercise.
:)
→ [feeling happy]:(
→ [feeling sad]:mytime
→ current time:+1hr
→ current time plus one hour:Exit
→ exit the chat
-
chatclient.h
header file for the chat client (C) -
chatclient.c
source file for the chat client (C) -
chatserver.h
header file for the chat server (C) -
chatserver.c
source file for the chat server (C) -
Makefile
file to compile the executable server and client files -
README.md
documentation with description, images and instructions
-
To build the executables for both chatclient and chatserver run the following command from the terminal inside the project directory:
$ make
-
To delete the executable files you can run:
$ make clean
- First run the chatserver executable with the following
usage:
e.g.
$ ./chatserver [port_number]
$ ./chatserver 5001
- To run a client executable use:
e.g.
$ ./chatclient [port_number] [username] [password]
$ ./chatclient 5001 andy secret-password
serveroutput.txt
complete log of the chat from the server view with logins/logouts and messages received (shortcuts will be displayed as received by the client, therefore not yet transformed);
- C Standard: C99
- Compiler: GCC
- IP address: 127.0.0.1 (hardcoded)
- Password: secret-password (hardcoded)
- Max length of message inputtable by the client: 1024 characters
- Edited with: CLion 2020.2.4
- Written on: MacOS 11.2.1
- Tested on:
- MacOS 11.2.1
- Ubuntu 18.04
- arpa/inet
- ctype (C Standard Library)
- pthread
- signal (C Standard Library)
- stdio (C Standard Library)
- stdlib (C Standard Library)
- string (C Standard Library)
- sys/socket
- time (C Standard Library)
- unistd