2021-02-06 04:42:36 +00:00
|
|
|
---
|
|
|
|
id: 5e7b9f0c0b6c005b0e76f073
|
2022-03-11 22:52:40 +05:30
|
|
|
title: 'Redes: Escribe un navegador web'
|
2021-02-06 04:42:36 +00:00
|
|
|
challengeType: 11
|
|
|
|
videoId: zjyT9DaAjx4
|
2022-03-11 22:52:40 +05:30
|
|
|
bilibiliIds:
|
|
|
|
aid: 761908574
|
|
|
|
bvid: BV1j64y1x7wx
|
|
|
|
cid: 377319579
|
2021-02-06 04:42:36 +00:00
|
|
|
dashedName: networking-write-a-web-browser
|
|
|
|
---
|
|
|
|
|
|
|
|
# --question--
|
|
|
|
|
|
|
|
## --text--
|
|
|
|
|
2022-03-11 22:52:40 +05:30
|
|
|
¿Qué crea el siguiente código?:
|
2021-02-06 04:42:36 +00:00
|
|
|
|
|
|
|
```py
|
|
|
|
import socket
|
|
|
|
|
|
|
|
mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
|
|
mysock.connect(('data.pr4e.org', 80))
|
|
|
|
cmd = 'GET http://data.pr4e.org/romeo.txt HTTP/1.0\r\n\r\n'.encode()
|
|
|
|
mysock.send(cmd)
|
|
|
|
|
|
|
|
while True:
|
|
|
|
data = mysock.recv(512)
|
|
|
|
if len(data) < 1:
|
|
|
|
break
|
|
|
|
print(data.decode(),end='')
|
|
|
|
mysock.close()
|
|
|
|
```
|
|
|
|
|
|
|
|
## --answers--
|
|
|
|
|
2022-03-11 22:52:40 +05:30
|
|
|
Un servidor web simple.
|
2021-02-06 04:42:36 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2022-03-11 22:52:40 +05:30
|
|
|
Un cliente de correo simple.
|
2021-02-06 04:42:36 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2022-03-11 22:52:40 +05:30
|
|
|
Una lista simple de tareas.
|
2021-02-06 04:42:36 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2022-03-11 22:52:40 +05:30
|
|
|
Un navegador web simple.
|
2021-02-06 04:42:36 +00:00
|
|
|
|
|
|
|
## --video-solution--
|
|
|
|
|
|
|
|
4
|
|
|
|
|