Python, Network Programming, Sockets, Programming, Technology.
{!r}'.format(message)) client_socket.sendall(message) # Look for the response amount_received = 0 amount_expected = len(message) while amount_received < amount_expected: data = client_socket.recv(16) amount_received += len(data) print('Received {!r}'.format(data)) finally: print('Closing socket')