Skip to content

Commit 142f98b

Browse files
authored
Merge pull request #23 from Shibin-Ez/master
move stage 5b into seperate practice problem
2 parents 7ec32d1 + db9ee6a commit 142f98b

5 files changed

Lines changed: 18 additions & 20 deletions

File tree

docs/.vitepress/config.mjs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,8 @@ export default defineConfig({
111111

112112
},
113113
{
114-
text: 'Stage 5 a): TCP Proxy',
115-
link: '/roadmap/phase-0/stage-5-a',
116-
},
117-
{
118-
text: 'Stage 5 b): File Transfer using TCP',
119-
link: '/roadmap/phase-0/stage-5-b',
114+
text: 'Stage 5: TCP Proxy',
115+
link: '/roadmap/phase-0/stage-5',
120116
},
121117
],
122118
},

docs/roadmap/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ The eXpServer project comprises 24 stages, organized into 5 phases. Prior to the
3333
- <span v-if="!isProd">✅</span> [Stage 2: TCP Client](phase-0/stage-2)
3434
- <span v-if="!isProd">🟡</span> [Stage 3: UDP with Multi-threading](phase-0/stage-3)
3535
- <span v-if="!isProd">✅</span> [Stage 4: Linux Epoll](phase-0/stage-4)
36-
- <span v-if="!isProd">✅</span> [Stage 5 a): TCP Proxy](phase-0/stage-5-a)
37-
- <span v-if="!isProd">🟡</span> [Stage 5 b): File Transfer using TCP](phase-0/stage-5-b)
36+
- <span v-if="!isProd">✅</span> [Stage 5: TCP Proxy](phase-0/stage-5)
3837

3938
### Phase 1: Building the core of eXpServer by creating reusable modules
4039

docs/roadmap/phase-0/stage-5-b.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# File Transfer using TCP
2-
## Recap
3-
4-
- In the previous stage, We made a TCP proxy by combining the functionalities of a TCP server and client which relays the communication between a web browser and a python file server.
52

63
## Learning Objectives
7-
- We will modify our TCP server and client code to implement a simple File Transfer System.
4+
5+
- Implement a simple File Transfer System using TCP sockets.
6+
- Practice file handling operations in C.
87

98
## Introduction
109

11-
In the previous stage we made a TCP proxy for relaying the communication between web browser and a python file server. In this stage we are modifying our TCP server and client code to perform a simple file transfer system using socket programming. Here we are modifying the client code to send a text file's content to the server, the modified tcp server will receive the data from the client and store the data in a specified file. This system mimics fundamental operations of [File Transfer Protocol(FTP).](https://en.wikipedia.org/wiki/File_Transfer_Protocol)
10+
In this practice problem, we will implement a simple file transfer system using socket programming. We will create a client that reads a text file's content and sends it to the server. The server will receive the data from the client and store it in a new file. This system mimics fundamental operations of [File Transfer Protocol (FTP)](https://en.wikipedia.org/wiki/File_Transfer_Protocol).
1211

1312
## Implementation
1413

@@ -163,10 +162,8 @@ Now we completed the `send_file()` function. In `main()`, close the `client_sock
163162
164163
## Milestone 2
165164
166-
We have successfully created our TCP client for file transfer. Now we can compile both fp_server.c and fp_client.c codes. After successful execution of the file transfer system we can observe the contents of t1.txt file is transfered in to the file t2.txt. Open the file t2.txt and see the new contents saved into it after the compilation of the codes.
165+
We have successfully created our TCP client for file transfer. Now we can compile both fp_server.c and fp_client.c codes. After successful execution of the file transfer system we can observe the contents of `t1.txt` file is transfered in to the file `t2.txt`. Open the file t2.txt and see the new contents saved into it after the compilation of the codes.
167166
168167
## Conclusion
169168
170-
This marks the end of Phase 0.
171-
172-
Phase 0 laid the foundation as to what is about to come next. Starting from the next phase, we start building eXpServer. Read more about Phase 1 [**here**](/roadmap/phase-1/).
169+
This exercise demonstrated the core principles of reliable file transfer over TCP: combining standard file I/O operations with network socket communication.
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Stage 5 a): TCP Proxy
1+
# Stage 5: TCP Proxy
22

33
## Recap
44

@@ -394,6 +394,12 @@ Screenshots of opening files using proxy server. Try to open the files from the
394394
![proxy_server2.png](/assets/resources/proxy_server2.png)
395395
![proxy_server3.png](/assets/resources/proxy_server3.png)
396396

397+
## Practice Problem (Optional)
398+
399+
You can do the optional practice problem to implement a very basic file transfer system using TCP. This task is intended for you to get familiarized with Linux file operations.
400+
401+
[File Transfer using TCP](/roadmap/phase-0/stage-5-b)
402+
397403
## Conclusion
398404

399-
In this stage we succesfully implemented the TCP proxy. In the next stage which act as a supplimenatary stage to this, we will implement a simple File Transfer System for transferring the the contents of a file to another file using TCP.
405+
In this stage, we successfully implemented the TCP proxy. This marks the end of Phase 0. Phase 0 laid the foundation as to what is about to come next. Starting from the next phase, we will start building eXpServer. Read more about Phase 1 [**here**](/roadmap/phase-1/).

docs/roadmap/phase-1/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Congratulations on the completion of Phase 0. Let’s take a look at what we hav
88
- In stage 2, we created our own TCP client and made it communicate with the TCP server
99
- In stage 3, We experimented with UDP and multi-threading
1010
- In stage 4, we made our TCP server support multiple simultaneous clients using _epoll_ (concurrency)
11-
- In stage 5a, we combined the functionality of a TCP server and client to create a TCP proxy, and in stage 5b, we implemented file transfer using TCP.
11+
- In stage 5, we combined the functionality of a TCP server and client to create a TCP proxy.
1212

1313
## What to expect in Phase 1
1414

0 commit comments

Comments
 (0)