The term socket programming refers to writing programs that execute across multiple computers in which the devices are all connected to each other using a network.
There are two communication protocols that one can use for socket programming: User Datagram Protocol (UDP) and Transfer Control Protocol (TCP).
The main difference between the two is that UDP is connectionless, meaning there is no session between the client and the server while TCP is connection-oriented, meaning an exclusive connection must first be established between client and server for communication to take place.
This tutorial presents an introduction to sockets programming over TCP/IP networks and demonstrates how to write client/server applications in Java. UDP is not a mainstream protocol and as such may not be often encountered.