<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import sys
import socket

print ('The addition client is up!\n')
#Create a socket
sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#Connect to the server's socket
sck.connect(('127.0.0.1',22000))
line = ''
while line != 'Quit\n':
    #While the user wants to communicate with server,
    #read her/his request,
    line = sys.stdin.readline()
    #send the request
    sck.send(bytes(line, 'UTF-8'))
    #and wait to receive the reply from the server.
    reply = sck.recv(516).decode('UTF-8')
    #The size of the messages should be less or equal to 516 Bytes.
    print (reply)


sck.close()


# vim:expandtab:tabstop=8:shiftwidth=4:softtabstop=4
</pre></body></html>