commit f9b2e483b824902937cbb2c15467ccd724764004
parent f1650d6fb9f44119c02ad22f69f384e8a3130383
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date: Fri, 18 Oct 2024 16:55:07 -0300
add `lab`
Diffstat:
4 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/lab/aplicacion/laboratorio_nivel_de_aplicacion.pdf b/lab/aplicacion/laboratorio_nivel_de_aplicacion.pdf
Binary files differ.
diff --git a/lab/aplicacion/server.py b/lab/aplicacion/server.py
@@ -0,0 +1,24 @@
+import http.server
+import socketserver
+
+PORT = 8000
+
+class Handler(http.server.SimpleHTTPRequestHandler):
+ def do_GET(self):
+ message = f'''
+ <!DOCTYPE html>
+ <html>
+ <body>
+ <h1>Hello, World!</h1>
+ <p>your IP address is `{self.client_address[0]}`</p>
+ </body>
+ </html>'''
+
+ self.send_response(200)
+ self.send_header("Content-type", "text/html; charset=utf-8")
+ self.end_headers()
+ self.wfile.write(bytes(message, "utf8"))
+
+# socketserver.TCPServer permite que el servidor escuche en todas las interfaces con '' o '0.0.0.0'
+with socketserver.TCPServer(("", PORT), Handler) as httpd:
+ httpd.serve_forever()
diff --git a/lab/red_y_enlace/laboratorio_nivel_de_red_y_enlace.pdf b/lab/red_y_enlace/laboratorio_nivel_de_red_y_enlace.pdf
Binary files differ.
diff --git a/lab/transporte/laboratorio_nivel_de_transporte.pdf b/lab/transporte/laboratorio_nivel_de_transporte.pdf
Binary files differ.