<div style="float:left; width:100%;">
This page presents the classes and functions of the [[Clients|BaseX Clients]],
and the underlying protocol, which is utilized for communicating withthe database server.A detailed example demonstrates how a concrete byte exchange can look like.
==Workflow==
All results end with a single {{Code|\0}} byte, which indicates that the process was successful. If an error occurs, a byte {{Code|\1}} is additionally sent, followed by the {{Code|error message}}.
===Example===
In the following example, a client registers a new session and executes the [[Commands#INFO|INFO]] database command. Next, it creates a new query instance for the XQuery expression {{Code|1, 2+'3'}}. The query is then evaluated, and the server returns the result of the first subexpression {{Code|1}} and an error for the second sub expression. Finally, the query instance and client session are closed.