Socket Lab 21
Socket Lab 21
DEPARTMENT OF CSE
SEMESTER-07
Lab Report
SUBMITTED BY SUBMITTED TO
Objectives :
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 :
Code :
Output :
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.
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.
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.