You are on page 1of 6

Experiment-9

Student Name: Ribhav Sharma UID: 20BCS6558


Branch: CSE(AIML) Section/Group: 20AIML4GRP-A
Semester: 5
Subject Name: COMPUTER NETWORKS LAB
Subject Code: 20CSP-342

1. Aim/Overview of the practical: Using Socket Programming implement the


connectionless oriented service using standard ports in any programming language (C,
C++, JAVA, Python, etc).

2. Task to be done:
In this experiment using Socket Programming we have to implement the connectionless
oriented service using standard ports in any programming language (C, C++, JAVA, Python,
etc).

3. Apparatus(For applied/experimental sciences/materials based labs):


PC/LAPTPOP WITH VS CODE OR PYCHARM INSTALLED
4. CODE:

UDP SERVER CODE:

import socket

localIP = "127.0.0.1"
localPort = 20001
bufferSize = 1024
m
s
UDP CLIENT CODE:

import socket

m
s

5. Result/Output/Writing Summary:

OUTPUT:
UDP SERVER:
UDP CLIENT:

CLIENT OUTPUT:
SERVER OUTPUT:

SUMMARY:

UDP is the abbreviation of User Datagram Protocol. UDP makes use of the Internet
Protocol of the TCP/IP suit. In communications using UDP, a client program sends a
message packet to a destination server wherein the destination server also runs on UDP.
The UDP does not provide guaranteed delivery of message packets. If for some issue in
a network if a packet is lost it could be lost forever. Since there is no guarantee of assured
delivery of messages, UDP is considered an unreliable protocol. The underlying
mechanisms that implement UDP involve no connection-based communication. There is
no streaming of data between a UDP server and a UDP Client.

Learning outcomes (What I have learnt):

From this experiment I learnt:

1. About Socket Programming

2. About UDP Server

3. About UDP Socket API

You might also like