I am not sure I fully understand what you are mean by difference between socket and TCP connection as a TCP connection is a form a socket.
According to what I have been taught, there are three types of sockets: Datagram, Stream, and Raw. Datagram sockets are connectionless an example being UDP. Stream sockets establish connections with TCP being a prime example of this type and raw sockets are used for lower level applications like Ping. From a programming stand point, I recall there being "Inet" domain sockets, like I just described above and "Unix" domain sockets that are used for inter-process communication.
|