Foundations of Python Network Programming
Chapter 5 ■ Network Data aND Network errors 76 In Python, you will normally represent bytes in one of two ways: either as an int ...
Chapter 5 ■ Network Data aND Network errors 77 The character in the upper-left corner is the space, by the way, at character cod ...
Chapter 5 ■ Network Data aND Network errors 78 The same is true of the many Windows code pages that you will see listed in the S ...
Chapter 5 ■ Network Data aND Network errors 79 You will generally want to fix such errors either by determining that you are usi ...
Chapter 5 ■ Network Data aND Network errors 80 In any case, the string '4253' is not how your computer represents this number as ...
Chapter 5 ■ Network Data aND Network errors 81 In summary, here is my advice for preparing binary data for transmission across a ...
Chapter 5 ■ Network Data aND Network errors 82 print('Listening at', sock.getsockname()) sc, sockname = sock.accept() print('Acc ...
Chapter 5 ■ Network Data aND Network errors 83 Note the nicety that since this socket is not intended to receive any data, the c ...
Chapter 5 ■ Network Data aND Network errors 84 Finally, what if you want the simplicity and efficiency of this fifth pattern but ...
Chapter 5 ■ Network Data aND Network errors 85 sock.listen(1) print('Run this script in another window with "-c" to connect') pr ...
Chapter 5 ■ Network Data aND Network errors 86 Pickles and Self-delimiting Formats Note that some kinds of data you might send a ...
Chapter 5 ■ Network Data aND Network errors 87 JSON is among the best choices available today for sending data between different ...
Chapter 5 ■ Network Data aND Network errors 88 Note that most compression schemes, when given tiny payloads, tend to make them l ...
Chapter 5 ■ Network Data aND Network errors 89 socket.gaierror: This exception is raised when getaddrinfo() cannot find a name o ...
Chapter 5 ■ Network Data aND Network errors 90 During handling of the above exception, another exception occurred: Traceback (mo ...
Chapter 5 ■ Network Data aND Network errors 91 This code assumes, of course, that DestinationError will only ever be wrapping OS ...
Chapter 5 ■ Network Data aND Network errors 92 In such cases, you will add exception handlers around specific sequences of netwo ...
93 Chapter 6 TLS/SSL Originally known as the Secure Sockets Layer (SSL) when first released by Netscape in 1995, Transport Layer ...
Chapter 6 ■ tLS/SSL 94 What would an observer know—where an “observer” could be anyone else connected to the coffee shop’s wirel ...
Chapter 6 ■ tLS/SSL 95 host identities. By default, your operating system TLS library or that of your web browser uses a standar ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf