Question ● Write TCP client and server program in c++ such that client will send one string to a server and server will display the string with all the words containing one or more vowels in an inverted fashion e.g., computer must be inverted as ‘retupmoc’. ● The server will then send the resulting string to client and client as a result will invert all the words containing no vowels and display it on the terminal e.g., dry must be inverted as ‘ryd’. ● Your server should be in running state infinitely and should not terminate after serving one client only. The clients will keep on coming one by one and server will keep on serving them unless terminated intentionally. ● Sample Test Bench – Client sends to server: “the birds fly in dry sky at night” – Server displays the string and returns to client: “eht sdirb fly ni dry sky ta thgin” – Client displays the string: “eht sdirb ylf ni yrd yks ta thgin

K3ZCX0 The Asker · Computer Science

● Write TCP client and server program in c++ such that client will send one string to
a server and server will display the string with all the words containing one
or more vowels in an inverted fashion e.g., computer must be inverted as
‘retupmoc’.
● The server will then send the resulting string to client and client as a result
will invert all the words containing no vowels and display it on the terminal
e.g., dry must be inverted as ‘ryd’.
● Your server should be in running state infinitely and should not terminate
after serving one client only. The clients will keep on coming one by one and
server will keep on serving them unless terminated intentionally.
● Sample Test Bench
– Client sends to server: “the birds fly in dry sky at night”
– Server displays the string and returns to client: “eht sdirb fly ni dry
sky ta thgin”
– Client displays the string: “eht sdirb ylf ni yrd yks ta thgin

More
Community Answer
TAC0BO

this code is for server  socket_echo_server.py import socket import sys # Create a TCP/IP socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Bind the socket to the port server_address = ('localhost', 10000) print('starting up on {} port {}'.format(*server_address)) sock.bind(server_address) # Listen for incoming connections sock.listen(1) while True: # Wait for a connection print('waiting for a connection') connection, client_address = sock.accept() try: print('connection from', client_address) # Receive the data in small chunks and retransmit it while True: data = connection.recv(16) print('received {!r}'.format(data)) if data: print('sending data back to the client') connection.sendall(data) else: print('no data from', clie ... See the full answer