import socket
ms = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ms.bind(('', 8080))
ms.listen(5)
conn, addr = ms.accept()
while True:
data = conn.recv(1000)
if not data:
break
print("Got Request")
conn.close()
ms.close()
What command should I add in order to send as a response to the request a file called hello.html. I have saved the file in the same location as the server.py file.
Aucun commentaire:
Enregistrer un commentaire