Boston 68.85.106.29 United States Boston 68.86.90.57 United States New_York 68.86.85.22 United States New_York 75.149.228.126 United States New_York 134.222.226.154 United Kingdom London 134.222.231.148 United Kingdom London 134.222.231.156 Netherlands Amsterdam 134.222.229.113 Netherlands Amsterdam 134.222.97.18 Netherlands Amsterdam 194.109.5.82 Netherlands Amsterdam 194.109.12.34 Netherlands Amsterdam 82.94.164.162 Netherlands Amsterdam
email: SMTP, POP3, IMAP Each application uses a different “port” number, so many different applications can use TCP to talk to an IP address at the same time
self.lines.append(line) if not line: self.sendResponse() def sendResponse(self): self.sendLine("HTTP/1.1 200 OK") self.sendLine("") for line in self.lines: self.sendLine(line) self.transport.loseConnection() reactor.listenTCP(80, HTTPFactory()) reactor.run() Twisted HTTP echo server
self.lines.append(line) if not line: self.sendResponse() def sendResponse(self): self.sendLine("HTTP/1.1 200 OK") self.sendLine("") for line in self.lines: self.sendLine(line) self.transport.loseConnection() reactor.listenTCP(80, HTTPFactory()) reactor.run()
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/ 537.17 (KHTML, like Gecko) Chrome/ 24.0.1312.57 Safari/537.17 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 What your browser sends web servers