##// END OF EJS Templates
Implementation of the client and library using TCP.
Implementation of the client and library using TCP.

File last commit:

r69:70
r75:76
Show More
server.py
26 lines | 451 B | text/x-python | PythonLexer
import socket
import time
host = "192.168.1.100"
s = socket.socket()
s.bind((host, 5500))
while True:
print "waiting client..."
s.listen(1)
sc, addr = s.accept()
all = ""
while True:
recibido = sc.recv(1024)
all = all + recibido
if all[-4:] == "quit":
break
print "\nTotal:", all
print "\nLongitud:", len(all)
sc.close()
s.close()
#print len(recibido)