0% found this document useful (0 votes)
6 views4 pages

Assignment6 SequentialBinaryFileDownload

sequential binary file downlaod

Uploaded by

ygottumu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Assignment6 SequentialBinaryFileDownload

sequential binary file downlaod

Uploaded by

ygottumu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ASSIGNMENT 6:

Sequential Binary File Download

Problem Statement: Write a program to create a server that listens to port 56 using stream
sockets. Write a simple client program to connect to the server. Run multiple clients that request
the server for binary files. The server should service each client one after the other before
terminating the connection

Date: 13th February 2025


Name: Yashaswini Gottumukkala
Registration Number: 2023001306

Step 1: Writing a python script for setting up a simple TCP server that listens for multiple
connections from the client on port 56 and sends the requested binary files.

The code is stored under server.py


Step 2: Writing a python script to set up a simple TCP client that connects to a server on
port 56, requests a binary file and receives the file. Multiple clients can request the server for
the file.

The code is stored under client.py

Step 3: Create a folder named pythonscripts and save both server.py and client.py in it.
Also save the binary files to be requested by the client here.

The files being used for this assignment are “sample.bin” and “textNumber.bin”.
Step 4: Displayed below are also the python scripts used to create the binary files.

Step 5: In command prompt, run the server.py script​

Step 6: Open another window on command prompt and run the client.py script

Step 7: Enter the binary file to be requested from the server. (Here, the files being used are
sample.bin and textNumber.bin)
Step 8: Once the file is requested, the server searches for the file in the os and sends it to the
client. After the file contents are sent the connection for that client is closed and the next
client request is processed sequentially.

Step 9: After all the requests are processed, the connection between the server and client is
closed.

You might also like