File: examples.rst

package info (click to toggle)
aiocoap 0.1%2B9ae36f4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 396 kB
  • ctags: 597
  • sloc: python: 2,987; makefile: 12
file content (28 lines) | stat: -rw-r--r-- 556 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Usage Examples
==============

In absence of a complete tutorial, these files can serve as reference
implementations for server and client. In order to test them, run
``./server.py`` in one terminal, and use ``./clientGET.py`` and
``./clientPUT.py`` to interact with it.

Client
------

.. literalinclude:: ../clientGET.py
   :language: python
   :linenos:
   :lines: 10-

.. literalinclude:: ../clientPUT.py
   :language: python
   :linenos:
   :lines: 10-

Server
------

.. literalinclude:: ../server.py
   :language: python
   :linenos:
   :lines: 10-