Files
freeCodeCamp/curriculum/challenges/japanese/07-scientific-computing-with-python/python-for-everybody/networking-write-a-web-browser.md
2022-01-20 20:30:18 +01:00

902 B

id, title, challengeType, videoId, bilibiliIds, dashedName
id title challengeType videoId bilibiliIds dashedName
5e7b9f0c0b6c005b0e76f073 ネットワーキング: ウェブブラウザーを作成する 11 zjyT9DaAjx4
aid bvid cid
761908574 BV1j64y1x7wx 377319579
networking-write-a-web-browser

--question--

--text--

次のコードは何を作成しますか?

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--

シンプルなウェブサーバー。


シンプルな電子メールクライアント。


シンプルな todo リスト。


シンプルなウェブブラウザー。

--video-solution--

4