This chapter provides a (necessarily) brief introduction to computer networking concepts. For many applications of gawk to TCP/IP networking, we hope that this is enough. For more advanced tasks, you will need deeper background, and it may be necessary to switch to lower-level programming in C or C++.
There are two real-life models for the way computers send messages to each other over a network. While the analogies are not perfect, they are close enough to convey the major concepts. These two models are the phone system (reliable byte-stream communications), and the postal system (best-effort datagrams).
Reliable Byte-streams (Phone Calls)
When you make a phone call, the following steps occur:
1. You dial a number.
2. The phone system connects to the called party, telling them there is an incoming call. (Their phone rings.)
3. The other party answers the call, or, in the case of a computer network, refuses to answer the call.
4. Assuming the other party answers, the connection between you is now a duplex (two-way), reliable (no data lost), sequenced (data comes out in the order sent) data stream.
5. You and your friend may now talk freely, with the phone system moving the data (your voices) from one end to the other. From your point of view, you have a direct end-to-end connection with the person on the other end.
The same steps occur in a duplex reliable computer networking connection. There is considerably more overhead in setting up the communications, but once it’s done, data moves in both directions, reliably, in sequence.
Download pdf TCP/IP Internetworking With gawk
Related Searches: byte streams, stream communications, networking connection, life models, networking concepts
RSS feed for comments on this post · TrackBack URI
Leave a reply