Updated Client Server protocol draft (markdown)

jeena 2011-01-31 06:49:01 -08:00
parent 1f75950175
commit 35f72d213e

@ -1,27 +1,128 @@
This is a proposition for the client -> server communication protocol. The idea is that we need to be able to define and call functions, and the very least.
<h2>Client -> Server</h2>
<table>
<thead>
<tr>
<th>Token</th> <th>Command</th> <th>Arguments</th> <th>Description</th>
</tr>
<thead>
<tr>
<th>Token</th>
<th>Command</th>
<th>Arguments</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td>__hello</td>
<td></td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__echo</td>
<td>optional message</td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__define</td>
<td>&quot;JavaScript&quot;</td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__start</td>
<td></td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__stop</td>
<td>optional message</td>
<td></td>
</tr>
<tr>
<td>lt;#ref_num&gt;</td>
<td>__boot</td>
<td>&lt;#ref_num&gt; &lt;#ref_num&gt;</td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__error</td>
<td>optional message</td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>COMMAND</td>
<td>optional message</td>
<td></td>
</tr>
</tbody>
</table>
<tr>
<td>&lt;#ref_num&gt;</td> <td>__define</td> <td>&quot;JavaScript&quot;</td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td> <td>__start</td> <td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td> <td>__stop</td> <td>Optional Message</td>
</tr>
<tr>
<td></td> <td>__boot</td> <td>&lt;#ref_num&gt; &lt;#ref_num&gt;</td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td> <td>__error</td> <td>Optional message</td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td> <td>COMMAND</td> <td>Optional parameters</td>
</tr>
<h2>Server -> Client</h2>
<p>Here the &lt;#ref_num&gt; is the clients own &lt;#ref_num&gt;.</p>
<table>
<thead>
<tr>
<th>Token</th>
<th>Command</th>
<th>Arguments</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__ok_hello</td>
<td></td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__ok_echo</td>
<td>optional message</td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__ok_define</td>
<td>&quot;JavaScript&quot;</td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__ok_start</td>
<td></td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__ok_stop</td>
<td>optional message</td>
<td></td>
</tr>
<tr>
<td>lt;#ref_num&gt;</td>
<td>___ok_boot</td>
<td>&lt;#ref_num&gt; &lt;#ref_num&gt;</td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>__error</td>
<td>optional message</td>
<td></td>
</tr>
<tr>
<td>&lt;#ref_num&gt;</td>
<td>COMMAND</td>
<td>optional message</td>
<td></td>
</tr>
</tbody>
</tbody>
</table>