Neil Horman wrote:
>> Q5. At what level are sockets ?
>> Q6. Are they also just 'abstract connections', time-sharing
>> and being socketX [when the data goes-to/comes-from X's
>> buffers] but latter serving as socketY ?
You should try not to look at things too "physically"...:
As others already explained, a socket is just a word for the
mechanism that You use to allow applications to use the "networking
facilities" of Your OS. So eventually, if You try to follow any given
TCP/IP packet from any server application to the requesting client
application and back, You will not see any "socket" there.
As a consequence, You will not re-use any socket, but "create" one when-
ever You need it and "destroy" it when You're done with it. In that
respect, and in combination with Your physical perception of this
mechanism, the term "socket" is misleading You.
Open Your box: You'll find that there are no "sockets"...
So, "socket" summarizes the work needed to make one specific appli-
cation talk (or listen) over the network.
>> Q7. How does [or not] 'loopback' fit in with all this ?
As Neil said, it may be desirable to have both server and client
applications on the same box, like in "telnet localhost" and the like.
X was a very good example: Avoiding to get too far off Your original
question, all communication between X clients and X servers occurs in
a way that works like a "normal" connection over the network. If You
don't have any network card installed ("standalone"), "loopback" pro-
vides You with some sort of pseudo network connection and interface
where both ends are local.
If You got the point of that last paragraph, You will see why X is an
excellent example for this: You can have an X-Terminal which runs only
an X server, and run applications (X clients) on a faster machine that
will only send their output to that terminal and read that terminals'
mouse and keyboard for input. This would be a "real" network connection
between X server and X client. -- Or, You can have both on the same
machine. The communication between X server and X client will be _ex-
actly_ the same, but instead of using ethN and a remote endpoint, it
will go through "lo" where, again, both ends are local.
Hope this cleared Neils excellent answer a bit for You, Jack.
--
----------------------------------------------------------------------
My personal reading of the string "MicroSoft" expands to "NanoWeak"...