Skip to content

Commit 3148614

Browse files
authored
Update README.md
1 parent 0589db3 commit 3148614

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
# ft
1+
# TCP File Transfer Application
2+
3+
The application has two primary parts - Client and Server - and the reliable transfer is ensured using TCP with help of socket() API specifying SOCK_STREAM.
4+
5+
### The Client’s flow:
6+
7+
* Checks for validity of arguments - needs server’s ip and port to fire up
8+
* Creates sockfd which controls the flow or the control of the connection
9+
* Connects socket ref by sockfd to server_addr (address and port specified)
10+
* Set up data connection in listenfd descriptor and binds the socket to data_addr port
11+
* Then until user quits, listens to commands, parses it using helpers, and executes them using the respective helper functions
12+
13+
### The Server’s flow:
14+
* Opens a TCP connection and starts listening to incoming connections
15+
* Binds the listening file descriptor to the specified port
16+
* Creates a fork of its process for every incoming connection, closing listenfd for that particular fork
17+
* Receives client’s data and command
18+
* Takes the necessary actions

0 commit comments

Comments
 (0)