0% found this document useful (0 votes)
13 views9 pages

Socket Lab 21

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)
13 views9 pages

Socket Lab 21

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/ 9

FARIDPUR ENGINEERING COLLEGE, FARIDPUR

DEPARTMENT OF CSE
SEMESTER-07

Lab Report

Course Name: Internet Programming Lab


Course Code: CSE-4113

SUBMITTED BY SUBMITTED TO

Name: Tasnim Hossain Timom Md. Rany Ahmed


Lecturer
Class Roll: 193006 Department of CSE
Reg. No: 3026 Faridpur Engineering College
Batch: CSE-03 FEC-07
Experiment No : 01
Experiment Name : Implement Socket Server in Python.

Objectives :

1. Facilitate communication between a client and server.


2. Understand the TCP/IP protocol for reliable network communication.
3. Explore handling multiple client connections using threading or multiprocessing.

Tools : PC, Visual Studio Code.

Code :
Output :

Discussion: In this experiment, we implemented a basic socket server in Python using the
TCP/IP protocol. The server listens on a specific port, accepts client connections, and facilitates
data exchange. Key concepts like binding to an IP/port, handling requests, and using threading
for managing multiple clients were covered. This experiment helped us understand the
fundamentals of socket programming and its role in client-server communication.
Experiment No : 02
Experiment Name : Implement Socket Client in Python.
Objectives :

1. Understand the basics of socket programming for a client in Python.


2. Implement a Python socket client to connect with a server.
3. Learn how to send and receive data between a client and a server.
4. Explore the TCP/IP protocol for client-server communication.

Tools : PC, Visual Studio Code.

Code :
Output :

Discussion : In this experiment, we implemented a socket client in Python that connects to a


server using the TCP/IP protocol. The client initiates a connection, sends requests, and receives
responses from the server. This exercise demonstrated how clients interact with servers in a
networked environment, showcasing the role of socket programming in establishing reliable
communication channels.
Experiment No : 03
Experiment Name : Implement Socket Client-Server Communication in Python.

Objectives:
1. Understand how to establish two-way communication between a client and server using
sockets in Python.
2. Implement both socket client and server programs.
3. Demonstrate data exchange between client and server over a TCP/IP connection.

Tools : PC, Visual Studio Code.

Code :
Output :

Discussion:
This experiment involved creating a client-server communication system in Python using socket
programming. The server listens for incoming connections from clients, and once a connection is
established, data is exchanged in both directions. This practical implementation helps in
understanding real-time communication, message handling, and how sockets facilitate
interaction between networked devices.
Experiment No : 04
Experiment Name : Implement Socket Multithread Client-Single Server Communication in
Python.

Objectives :
1. Understand how to manage multiple client connections to a single server using multithreading
in Python.
2. Implement a socket server that handles multiple clients simultaneously.
3. Demonstrate concurrent data exchange between the server and multiple clients.

Tools : PC, Visual Studio Code.

Code :
Output :

Discussion :

This experiment involves creating a single server that communicates with multiple clients
simultaneously using multithreading. The server listens for multiple client connections, and each
client is handled in a separate thread to enable parallel communication. This setup is crucial for
understanding how to build scalable network applications where a server can interact with many
clients at the same time without blocking.

You might also like