ASSIGNMENT 5:
Text File Download by Client from Server
Problem Statement: Write a program to create a server that listens to port 55 using stream
sockets. Write a simple client program to connect to the server. The client should request for a
text file and the server should return the file before terminating the connection
Date: 4th February 2025
Name: Yashaswini Gottumukkala
Registration Number: 2023001306
Step 1: Writing a python script for setting up a simple TCP server that listens for
connections of port 55 and sends the requested text file.
The code is stored under [Link]
Step 2: Writing a python script to set up a simple TCP client that connects to a server on
port 55, requests a file and receives the file content.
The code is stored under [Link]
Step 3: Create a folder named pythonscripts and save both [Link] and [Link] in it.
Also save the file to be requested by the client here.
The file being used for this assignment is “[Link]” and the contents of it are displayed
below.
Step 4: In command prompt, run the [Link] script
Step 5: Open another window on command prompt and run the [Link] script
Step 6: Enter the filename to be requested from the server. (Here, the file being used is
[Link])
Step 7: Once the file is requested, the server reads the file and sends it to the client. After the
file contents are sent the connection is closed.
Step 8: After the file is sent by the server, its contents are received by the client and
displayed on the screen.