Convert Code Upd Client Server Object Oriented Paradigm Class Defined Object Constructed E Q37098219

Convert the code of upd client and server in object-orientedparadigm. Class should be defined and an object is constructed. Forexample,

class UDPserver:

def __init__(self):

   self.s = socket(AF_INET, SOCK_DGRAM)

def binding(self,port):

    # implement here

def talking(self):

   while 1:

       # implement here

# below is to use the class

udp1 = UDPserver()

udp1.binding(53535)

udp1.talking()

Then the client program is

# using class

from socket import *

class UdpClientClass:

def __init__(self):

   self.c = socket(AF_INET, SOCK_DGRAM)

def talking(self,port):

    # implement here

# below is to use the class

for ping in range(10):

  client = UdpClientClass()

  client.talking(53535)

Write tcp socket programs for server and client. The both serverand client programs should communicate interactively. Onerequirement is to display your name in the dialog.

Discuss the difference of UDP and TCP that you

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.