Site hosted by Angelfire.com: Build your free website today!

Hands-on Projects for the Linux Graphics Subsystem

New book from Christos Karayiannis

Available in Amazon Kindle format at:

amazon.com   amazon.co.uk   amazon.de   amazon.es   amazon.fr   amazon.it

At sections 2.1, 2.2 and 2.3, we examined the X Client requests as they are prepared, buffered and flushed to the X Server. At the subsections that follow, subsections 2.4.1 and 2.4.2, we examine the X Client-Server interaction at the X Protocol messages. In other words how the X Protocol messages sent by the X Client are received and dispatched by the X Server. Notice that this is a short introduction since the process of accepting and dispatching the messages by the X Server processing is examined more thoroughly in the third section, called "The X Server side".

The X Server iteration loop that handles X Client connections, requests and processes events is found at Dispatch(), which is called from the main() X Server routine. In this section we focus on client requests. The X Server accepts requests in Dispatch() with the following instruction:

	        nready = WaitForSomething(clientReady);

This is examined in section 2.4.1 and in more detail in section 3.2.5.2 and section 3.2.5.5.

With the following instruction the X Server reads requests from the client:

	        result = ReadRequestFromClient(client);

This is examined in detail in section 3.2.5.3.

With the next instruction the X Server dispatches the X Client requests:

                result = (*client->requestVector[MAJOROP])(client);

This is described in section 2.4.2 and in more detail in section 3.2.5.3. A complete case study of X request dispatching is included in section 7.1.