I do not understand why after sending a message I can not send any more messages to my server from my client
#servidor
import socket
host = "127.0.0.1"
port = 6666
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print ("Socket Created")
sock.bind((host, port))
print ("socket bind complete")
sock.listen(1)
print ("socket now listening")
while 1:
conn, addr = sock.accept()
datos = conn.recv(4096)
print(datos.decode('utf-8'))
conn.send("hello".encode('UTF-8'))
the client can connect to the server, the message from the server reaches the client only after sending the first message, when sending a second message from the client it is not possible
#cliente
import socket
host = "127.0.0.1"
port = 6666
sock = socket.socket()
sock.connect((host, port))
while True:
message = input("envia un mensaje")
sock.send(message.encode('utf-8'))
datos = sock.recv(4096)
print (datos.decode('utf-8'))
if message == "quit":
break
print("bye")
sock.close()