vim netzwerk-protokoll*

This commit is contained in:
CodeSteak 2019-04-03 19:27:14 +02:00
parent c4264cdf03
commit e899a325a6
3 changed files with 77453 additions and 31043 deletions

View File

@ -1,141 +0,0 @@
<h2>Query</h2>
<p>Client sendet nach Schema:</p>
<p>Zusammenhängde Eingaben werden als Strings in einem Array übertragen.</p>
<pre>
type = JSON
{
"query": {
"query" : &lt;Array of &lt;String&gt;&gt;
}
}
</pre>
<p>Server antwortet nach Schema:</p>
<pre>
type = JSON
&lt;Array of &lt;Texture&gt;&gt;
</pre>
<h2>Get Texture</h2>
<p>Client sendet nach Schema:</p>
<pre>
type = JSON
{
"get_texture": {
"id" : &lt;UUID&gt;,
}
}
</pre>
<p>Server antwortet nach Schema:</p>
<pre>
type = JSON
&lt;Texture&gt;
</pre>
<p>Oder, wenn Textur nicht gefunden</p>
<pre>
type = Error
</pre>
<h2>Get Texture File</h2>
<p>Client sendet nach Schema:</p>
<pre>
type = JSON
{
"get_texture_file": {
"texture_hash" : &lt;Hash&gt;,
}
}
</pre>
<p>Server antwortet nach Schema:</p>
<pre>
type = Binary
Textur-Datei
</pre>
<p>Oder, wenn Textur-Datei nicht gefunden</p>
<pre>
type = Error
</pre>
<h2>Get Texture Preview</h2>
<p>Client sendet nach Schema:</p>
<pre>
type = JSON
{
"get_texture_preview": {
"texture_hash" : &lt;Hash&gt;,
}
}
</pre>
<p>Server antwortet nach Schema:</p>
<pre>
type = Binary
Textur-Preview
</pre>
<p>Oder, wenn Textur-Datei nicht gefunden</p>
<pre>
type = Error
</pre>
<h2>Replace Texture</h2>
<p>
Diese Request dient dazu alte Texturen zu löschen und neue Hinzufügen.
Ein Löschen und gleichzeitiges Hinzufügen, ergibt ein Update der Textur.
</p>
<p>
Falls "old" != null, wird die hier angebene Textur gelöscht. Wird diese nicht
exakt gleich vorgefunden, schlägt diese Anfrage fehl (type = Error). In diesem Fall
wird "new" nicht berücksichtigt.
</p>
<p>
Falls "new" != null, wird die hier angebene Textur zum System hinzugefügt.
Sollte die angebene id schon vorhanden sein, schlägt diese Anfrage fehl (type = Error).
</p>
<p>
Dieser Semantik wurde gewählt, damit ein Update atomar ist und dopplte Anfragen zum Fehlern führen.
</p>
<p>Client sendet nach Schema:</p>
<pre>
type = JSON
{
"replace_texture": {
"old": &lt;Texture&gt; | null,
"new": &lt;Texture&gt; | null,
}
}
</pre>
<p>Server antwortet nach Schema:</p>
<pre>
type = JSON
true
</pre>
<p>Oder falls "texture_hash" nicht gefunden wurde nach Schema:</p>
<pre>
type = JSON
{
"get_texture_file": {
texture_hash : &lt;Hash&gt;,
}
}
</pre>
<p> Woraufhin der Client die Textur-Datei sendet:</p>
<pre>
type = Binary
Textur-Datei
</pre>
<p>Der bestätigt dies dann mit:</p>
<pre>
type = JSON
true
</pre>

File diff suppressed because it is too large Load Diff