11Internet Programming with Python
22================================
33
4- .. image :: ../../../ img/python.png
4+ .. image :: img/python.png
55 :align: left
66 :width: 33%
77
@@ -32,7 +32,7 @@ Licensed with Creative Commons BY-NC-SA
3232* You may not use the work for commercial purposes
3333* You have to share your versions just like this one
3434
35- If you find mistakes, or see improvements, feel free to make a pull request
35+ Find mistakes? See improvements? Make a pull request.
3636
3737But First
3838---------
@@ -91,7 +91,7 @@ do you have any?
9191Computer Communications
9292-----------------------
9393
94- .. image :: ../../../ img/network_topology.png
94+ .. image :: img/network_topology.png
9595 :align: left
9696 :width: 40%
9797
@@ -112,15 +112,15 @@ image: http://en.wikipedia.org/wiki/Internet_Protocol_Suite
112112Computer Communications
113113-----------------------
114114
115- .. image :: ../../../ img/data_in_tcpip_stack.png
115+ .. image :: img/data_in_tcpip_stack.png
116116 :align: left
117- :width: 50 %
117+ :width: 55 %
118118
119119.. class :: incremental
120120
121- * We divide the process into 'layers'
121+ * Process divided into 'layers'
122122
123- * 'Layers' are mostly arbitrary descriptions
123+ * 'Layers' are mostly arbitrary
124124
125125* Different descriptions have different layers
126126
@@ -283,3 +283,30 @@ this is where we live and work
283283Sockets
284284-------
285285
286+ Think back for a second to what we just finished discussing, the TCP/IP stack.
287+
288+ .. class :: incremental
289+
290+ * The *Internet * layer gives us an **IP Address **
291+
292+ * The *Transport * layer establishes the idea of a **port **.
293+
294+ * The *Application * layer doesn't care about what happens below...
295+
296+ * *Except for * **endpoint data ** (IP:Port)
297+
298+ .. class :: incremental
299+
300+ A **Socket ** is the software representation of that endpoint.
301+
302+ .. class :: incremental
303+
304+ Opening a **socket ** creates a kind of transceiver that can send and/or
305+ receive data at a given IP address and Port.
306+
307+ Sockets in Python
308+ -----------------
309+
310+ Python provides a standard library module which provides socket functionality.
311+ It is called **socket **. Let's spend a few minutes getting to know this
312+ module.
0 commit comments