Changes

Jump to navigation Jump to search
235 bytes added ,  14:39, 18 September 2011
no edit summary
This page presents the code structure of the BaseX clients andthe client/server protocol of BaseX, which that is needed to
write clients in other programming languages.
==Description==
 
First of all, the BaseX database server must be running to
work with the clients.
Each client provides a session class or script with methods
to connect to and communicate with the BaseX database server.
A socket connection will be established by the constructor, which
===Syntax===
* String (UTF8)<code>\x</code>: single byte.* <code>{...}</code>: strings, which are transfered in the UTF8 encoding.* Single Byte: <code>\X[...]</code>: binary data. All 00 and FF bytes are prefixed with FF.
===Authentication===
# Server sends <code>\0</code> (success) or <code>\1</code> (error)
===Client requestRequest===
- command: -> {command} \0
- create: -> \8 {name} \0 {[input} ] \0 - add: -> \9 {name} \0 {path} \0 {[input} ] \0
- watch: -> \10 {name} \0
- unwatch: -> \11 {name} \0
- replace: -> \12 {path} \0 {[input} ] \0 - store: -> \13 {path} \0 {[input} ] \0
- query: start -> \0 {query} \0
bind -> \3 {id} \0 {variable} \0 {value} \0 {type} \0
close -> \2 {id} \0
===Server responseResponse===
- command: -> {result} \0 {info} \0 \0
Bureaucrats, editor, reviewer, Administrators
13,551

edits

Navigation menu