New terminal types can be added by providing an appropriate X server. The programmers do not have to deal with the communications. They just write graphic applications to Xlib, regardless of whether the users will be remote or local. Protocol An X Window System protocol can be implemented on top of any reliable byte stream transport mechanism. It uses a simple block protocol on top of the stream layer.
Requests flow from the client application to the X server.
Length is 2-bytes long. Data may be zero or more bytes, depending on the request. Reply, error and event messages are sent by the X server to the X client applications. Displays are always numbered from zero. There are more than a hundred different possible requests, each corresponding to an Xlib application call.