X Windows operates over TCP, typically using server port numbers starting with 6000. The X Protocol, documented in a postscript file, defines dozens of messages that can be exchanged between a client and a server. Typical requests include Draw PolyLine, Draw Text, Create Window, Fill. Replies are matched to particular Requests.
Events are asynchronous occurances such as keystrokes and mouse clicks.
Errors are matched to particular Requests. If a window is partially or fully obscured by another, overlapping window, the server has two options available to it. The server can allocate additional memory, called backing store , to record to contents of the obscured window. This is purely optional, however. The server can simply ignore the obscured part of the window.