Commit dac737ef authored by Bonnegent's avatar Bonnegent

amélioration de l'affichage

parent b998df4d
......@@ -9,13 +9,17 @@ def main(host="localhost", port=7777):
except ConnectionRefusedError:
print('connection error')
return False
except TimeoutError:
print('time out')
return False
# peu importe le message
message = "get /"
mySocket.send(message.encode())
data = mySocket.recv(1024).decode()
print ('received from %s:%d: [%s]' % (host, port, data))
# print('received from %s:%d: [%s]' % (host, port, data))
print('received from [{0}:{1}]: [{2}]'.format(host, port, data))
mySocket.close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment