Python socket get stuck when printing

41 Views Asked by At

program 1:

print(client_socket.recv(1024).decode('utf-8))

program 2:

response=client_socket.recv(1024).decode('utf-8')
 print(response)
 # rest of the code

program 1 works fine but program 2 is stucking

the second program is printing the response and I except it to continue after that but it stuck there after the print, can someone explain what is happening here? also printing after send do the same thing

0

There are 0 best solutions below