the socket function in python is simplex (single path)?

1
import socket
s = socket.socket()
s.connect(("localhost", 9999))
s.listen(5)
sc, addr = s.accept()
while True:
    recibido = sc.recv(1024)
    mensaje = raw_input("> ")
    s.send(mensaje)
    print(recibido)
    if mensaje=="exit":
        break
print "fin de conecxion"
s.close()
    
asked by djarte 08.07.2018 в 05:40
source

0 answers