Skip to content

Socket programming and Multi-threading in C using TCP/IP Protocol.

Notifications You must be signed in to change notification settings

HafsaI/Concurrent-File-Transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Concurrent-File-Transfer

Socket programming and Multi-threading in C using TCP/IP Protocols #Protocol TCP (Transmission Control Protocol) was used; a communications standard that enables application programs and computing devices to exchange messages over a network. It is designed to send packets across the internet and ensure the successful delivery of data and messages over networks.

Logic

Socket programming in c language and multi threading to ensure concurrent transfer of files. Server sends the file size that it is sending to the client. Client sends n threads for file transfer. Server opens file to read, creates n threads and sends the read file in n chunks to client. Client also creates n threads and receives those chunks in n threads and writes each chunk to file.

How to Compile on Linux Terminal

Client: gcc -o c.o client.c -lpthread -lm
Server: gcc server.c -lpthread -lm

Math.h and pthread.h are not a part of the standard C library, so had to link to it using -lpthread and -lm

About

Socket programming and Multi-threading in C using TCP/IP Protocol.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages