So far the we've just been watching the train wiz by--trying to take as much in as possible. Time to review the tape just a bit.
Transport Layers
TCP isn't the only transport layer, that honor is shared with UDP (User Datagram Protocol). Both contain information concerning sending and destination ports, they differ in how they handle packet sequencing. Where TCP insures packets are processed in the order sent, UDP just sends them on to the application in the order received--no insurance, just pure raw speed. UDP works well when you're sending/receiving a single packet or when you're streaming audio or video for recreational use.
Ports
Remember the mail analogy? Well, if the IP address is like the address to your building, a port number is your name. All incoming mail has your name on it because all the mail you sent out has your name on the top left, so those catalog companies know whom to send stuff to.
The concept of port is borrowed from the physical ports on your machine--those interfaces that allow you to connect machine to machine with various wires and such. But port numbers are simply that, numbers that are used to identify the sending and receiving nodes of internet applications.
Port numbers range from 65,535 to 0 since they are represented by 16 bits. Numbers 0-1023 are restricted for common internet application use (HTTP, FTP, ETC).
Servers generally receive HTTP requests on port number 80 (standard just to say port 80). Client applications, on the other hand, define a new and unique port for each data element coming in. Think of it as an insanely fast moving deli line at your local grocery store, every part of the request gets its own number.
The Data Link Layer
What's under IP? Good question: it's the data link layer. Let's not get into it much here, just know that every physical device on your network is assigned a Media Access Control (MAC) address to identify itself on a network. The MAC address is usually burned into the machine during manufacturing, like a fingerprint or something. OK, there it is, now you know.
Sockets
A "socket" is a class of software that is used to "bind" a connection between two applications into a persistent connection. For example, it is the deal that is sealed after TCPs three way handshake: client reaches out to shake the hand of server, server reaches back to shake the hand of client, client and server shake the shake and establish a socket connection that enables their a working and productive relationship. How nice.
Resources
From java.sun.com
RandomGuy James again
Socket stuff from java.sun.com
About.com on Sockets
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment