documentation for tools
chrysn
9 years ago
18 | 18 |
-----
|
19 | 19 |
|
20 | 20 |
For details on how to usethe aiocoap library, have a look at the :mod:`aiocoap`
|
21 | |
module documentation, or at the :doc:`examples` provided.
|
|
21 |
module documentation, or at the :doc:`examples` and :doc:`tools` provided.
|
22 | 22 |
|
23 | 23 |
Relevant URLs
|
24 | 24 |
-------------
|
|
0 |
#!/usr/bin/env python3
|
|
1 |
|
0 | 2 |
# This file is part of the Python aiocoap library project.
|
1 | 3 |
#
|
2 | 4 |
# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
|
|
0 |
#!/usr/bin/env python3
|
|
1 |
|
0 | 2 |
# This file is part of the Python aiocoap library project.
|
1 | 3 |
#
|
2 | 4 |
# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
|
0 | 0 |
Usage Examples
|
1 | 1 |
==============
|
2 | 2 |
|
3 | |
In absence of a complete tutorial, those files can serve as reference
|
4 | |
implementations for server and client:
|
|
3 |
In absence of a complete tutorial, these files can serve as reference
|
|
4 |
implementations for server and client. In order to test them, run
|
|
5 |
``./server.py`` in one terminal, and use ``./clientGET.py`` and
|
|
6 |
``./clientPUT.py`` to interact with it.
|
5 | 7 |
|
6 | 8 |
Client
|
7 | 9 |
------
|
|
9 | 11 |
.. literalinclude:: ../clientGET.py
|
10 | 12 |
:language: python
|
11 | 13 |
:linenos:
|
12 | |
:lines: 8-
|
|
14 |
:lines: 10-
|
|
15 |
|
|
16 |
.. literalinclude:: ../clientPUT.py
|
|
17 |
:language: python
|
|
18 |
:linenos:
|
|
19 |
:lines: 10-
|
13 | 20 |
|
14 | 21 |
Server
|
15 | 22 |
------
|
|
17 | 24 |
.. literalinclude:: ../server.py
|
18 | 25 |
:language: python
|
19 | 26 |
:linenos:
|
20 | |
:lines: 8-
|
|
27 |
:lines: 10-
|
17 | 17 |
aiocoap.util.asyncio
|
18 | 18 |
aiocoap.util.queuewithend
|
19 | 19 |
examples
|
|
20 |
tools
|
20 | 21 |
LICENSE
|
|
0 |
#!/usr/bin/env python3
|
|
1 |
|
0 | 2 |
# This file is part of the Python aiocoap library project.
|
1 | 3 |
#
|
2 | 4 |
# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
|