[Python编程(第4版)].(Programming.Python.4th.Edition).Mark.Lutz.文字版
Web services: XML-RPC, SOAP XML-RPC is a technology that provides remote procedural calls to components over networks. It routes ...
the distributed extension to COM, DCOM, offers additional options for distrib- uting applications over networks. Other tools Oth ...
structure to discussions carried out over sockets. Let’s briefly look at each of these layers in the abstract before jumping int ...
domain name server—a program on the Net that serves the same purpose as your local telephone directory assistance service. As a ...
run on top of sockets. In short, the standard Internet protocols define a structured way to talk over sockets. They generally st ...
you might have to know and type the HTTP port number of every site you visit while surfing the Net. By defining standard port nu ...
Some protocols may define the contents of messages sent over sockets; others may specify the sequence of control messages exchan ...
Table 12-2. Common Internet-related standard modules Python modules Utility socket, ssl Network and IPC communications support ( ...
http://www.ietf.org http://www.iana.org/numbers.html http://www.iana.org/assignments/port-numbers http://www.w3.org It’s not imp ...
Python’s struct module can also be used to format Python objects as packed binary data byte strings for transmission, but is gen ...
from socket import * # get socket constructor and constants myHost = '' # '' = all available interfaces on host myPort = 50007 # ...
Server socket calls Before we see these programs in action, let’s take a minute to explain how this client and server do their s ...
value of 5 is usually enough for most socket-based programs; the value must be at least 1. At this point, the server is ready to ...
For example, although the socket model is limited to transferring byte strings, you can send and receive nearly arbitrary Python ...
running; in our scripts, server and client agree to use port number 50007 for their conversation, outside the standard protocol ...
Running Socket Programs Locally Let’s put this client and server to work. There are two ways to run these scripts—on either the ...
Running Socket Programs Remotely To make these scripts talk over the Internet rather than on a single machine and sample the bro ...
And here is what appears in the Windows console window where I run the client. A “connected by” message appears in the server SS ...
account of your own like the one I’m using on learning-python.com, simply run client and server examples on the same machine, lo ...
Tips on Using Remote Servers Some of this chapter’s examples run server code on a remote computer. Though you can also run the e ...
«
37
38
39
40
41
42
43
44
45
46
»
Free download pdf