Sockets natively read and write sequences of bytes
To communicate usefully you usually have to frame messages and
abide by some talk protocol, e.g., who can send and who should listen. All of this is discussed and illustrated with
code, using the links on this page.
You've seen the links, below, in the last lecture on Threads. The techniques they present
are needed for building responsive message-passing communication channels.