Diferències

Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.

Enllaç a la visualització de la comparació

Ambdós costats versió prèvia Revisió prèvia
Següent revisió
Revisió prèvia
info:cursos:pue:python-pcpp1:m4:1.2 [08/01/2024 20:26] – [What can we expect from the server's response?] mateinfo:cursos:pue:python-pcpp1:m4:1.2 [05/03/2024 09:09] (actual) – [Requesting a document from a server: continued] mate
Línia 129: Línia 129:
 === Requesting a document from a server === Requesting a document from a server
 Yes, it's send - look at how we combine it with our code from the previous lesson: Yes, it's send - look at how we combine it with our code from the previous lesson:
-<code ; output>+<code python>
 sock.send(b"GET / HTTP/1.1\r\nHost: " + sock.send(b"GET / HTTP/1.1\r\nHost: " +
           bytes(server_addr, "utf8") +           bytes(server_addr, "utf8") +
Línia 179: Línia 179:
 The argument specifies the maximal acceptable length of the data to be received. If the server's response is longer than this limit, it will remain unreceived. The argument specifies the maximal acceptable length of the data to be received. If the server's response is longer than this limit, it will remain unreceived.
  
-You will need to invoke ''recv()'' again (maybe more than once) to get the remaining part of the data. It's a general practice to invoke '''recv()'' as long as it returns some data.+You will need to invoke ''recv()'' again (maybe more than once) to get the remaining part of the data. It's a general practice to invoke ''recv()'' as long as it returns some data.
  
 There are lots of bad things which can spoil our game. For example, the server may not want to talk with us. There are lots of bad things which can spoil our game. For example, the server may not want to talk with us.
  • info/cursos/pue/python-pcpp1/m4/1.2.1704742000.txt.gz
  • Darrera modificació: 06/07/2026 18:29
  • (edició externa)