Skip to content

Commit

Permalink
One more copy of socket1.py
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Jun 27, 2017
1 parent 7c443d5 commit 7996409
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/socket1.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import socket

mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

mysock.connect(('data.pr4e.org', 80))
mysock.send('GET http://data.pr4e.org/romeo.txt HTTP/1.0\n\n')
mysock.send('GET http://data.pr4e.org/intro-short.txt HTTP/1.0\r\n\r\n')

while True:
data = mysock.recv(512)
Expand Down

0 comments on commit 7996409

Please sign in to comment.