Do objects created by urllib2.urlopen() represent a constant connection?

前端 未结 1 1150
悲哀的现实
悲哀的现实 2021-01-22 15:36

In the following code, is the connection to the remote server held open until close() is called or is it recreated every time read() is called? In the

相关标签:
1条回答
  • 2021-01-22 16:40

    Try running wireshark or fiddler and look at port 80 with nothing else running. Run your program and see what traffic you get. Should answer your question.

    0 讨论(0)
提交回复
热议问题