9 msgFromClient =
"HelloUDPServer"
10 bytesToSend = str.encode(msgFromClient)
11 serverAddressPort = (
"127.0.0.1", 2718)
15 UDPClientSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)
18 UDPClientSocket.sendto(bytesToSend, serverAddressPort)
20 msgFromServer = UDPClientSocket.recvfrom(bufferSize)
22 msg =
"Message from Server {}".format(msgFromServer[0])