OS: Ubuntu 20.04 LTS
IDE: Visual Studio Code
Compile Server and execute:
gcc -o server server.c
./server
Compile Client and execute:
gcc -o client client.c
./client
Output on Client side console/terminal:
[+]Server socket created.
[+]Connected to server.
[+] File data send successfully.
[+]Disconnected from the server.
Output on Server side console/terminal:
[+]Server socket created.
[+]Binding Successfull.
[+]Listening...
[+]Data written in the text file
Note:
1. You can see the changes in the file.txt and file2.txt which are present in the repo, since that data get transferred from one file to another !!
2. The Libraries #include<apra/inet.h> are available only for the Linux Distros not for the windows, for windows we need to use #include<winsock2.h>
3. Kindly Raise Issues if there is any problem or you can mail me at [email protected] !!