Skip to content

pshashipreetham/File-Transfer-Using-TCP-Socket-in-C-Socket-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Transfer Using TCP Socket in C | Socket Programming

OS: Ubuntu 20.04 LTS
IDE: Visual Studio Code

Commands to be followed

Server:

Compile Server and execute:

gcc -o server server.c
./server

Client:

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 psp316r@gmail.com !!